Forum: C++ May 1st, 2009 |
| Replies: 9 Views: 353 What sort of syntax error? Also, the class listings for "dog" and "showdog" may help. |
Forum: C++ Apr 30th, 2009 |
| Replies: 9 Views: 353 Code looks better, but there are still a couple of trouble spots - first, now, in your while loop, you are not incrementing "i" at all! In your assignments to the array, you will overwrite the same... |
Forum: C++ Apr 30th, 2009 |
| Replies: 9 Views: 353 A couple of things to look out for:
1) In your loop, you are iterating 10 times. However, your data file may not have 10 "dog" items in it. You might be better off reading until EOF.
2) Your... |
Forum: C++ Apr 30th, 2009 |
| Replies: 1 Views: 377 This site may help:
http://www.webmonkey.com/reference/Color_Charts
After the "#" sign, each set of 2 digits represents the Red, Green and Blue components of the color. |
Forum: C# Mar 18th, 2009 |
| Replies: 4 Views: 2,103 I take it that when you say "publish", you are using the publish command from the "Build" menu... if that's the case, then yes, when you get the output package from the Publish process, and then... |
Forum: C# Mar 18th, 2009 |
| Replies: 3 Views: 2,135 I'm not sure what you're after. You can load XML in from a file stream. You can put XML into a string. You can read XML into a string from a file stream. Perhaps some more detail about what... |
Forum: C++ Mar 16th, 2009 |
| Replies: 8 Views: 608 To answer the question about adding the ".cpp.o" rule: When I ran your makefile as is, I was seeing the compilation of the .cpp files (trying to make the output .o files) working, but it was not... |
Forum: C# Mar 14th, 2009 |
| Replies: 7 Views: 1,494 In my sample, I put the loading of "about:blank" in Form_Load() to give the control time to navigate (and more important), initialize the "Body" member of the WebControl. If you put the... |
Forum: C# Mar 14th, 2009 |
| Replies: 7 Views: 1,494 You can use the WebBroswer control to display text. Drag a WebBrowser control onto your form. Put this in your Form_Load():
webBrowser1.Navigate("about:blank");
Then, use this code to fill it:... |
Forum: C++ Mar 14th, 2009 |
| Replies: 8 Views: 608 Try this makefile:
TOP_DIR = /root/workspace
S_DIR = $(TOP_DIR)/source
H_DIR = $(TOP_DIR)/makedemo/header
HEADERS = $(shell ls $(H_DIR)/*.H)
SOURCES = $(shell ls $(S_DIR)/*.cpp)
... |
Forum: C# Mar 13th, 2009 |
| Replies: 26 Views: 2,284 |
Forum: C# Mar 13th, 2009 |
| Replies: 26 Views: 2,284 Well, checking your boxes for user input will be a chore. Having the controls in an array would help with that. |
Forum: C# Mar 13th, 2009 |
| Replies: 26 Views: 2,284 :icon_eek: There's a lot of stuff flying around here.
OK, here's some code to get the grid of TextBoxes displayed, and a button that shows some basic interaction:
Put this at the top of your... |
Forum: C++ Mar 13th, 2009 |
| Replies: 16 Views: 1,141 I agree, you could represent the suits with an enum; but since he was looking for a class/inheritance feature, I suggested that one. Certainly your approach works as well. |
Forum: C++ Mar 13th, 2009 |
| Replies: 16 Views: 1,141 Perhaps you could define a base class, called "Card" that has the rank values contained within it, as cards of all suits have a rank value. Then, you could define 4 derived classes, "SpadeCard",... |
Forum: C++ Mar 13th, 2009 |
| Replies: 8 Views: 608 Please post your updated makefile and I'll take a look. |
Forum: C++ Mar 13th, 2009 |
| Replies: 8 Views: 608 Your shell commands are off. Try this:
HEADERS = $(shell ls /root/workspace/makedemo/header/*.h)
SOURCES = $(shell ls /root/workspace/source/*.cpp) |
Forum: C++ Mar 13th, 2009 |
| Replies: 3 Views: 681 Even though it's wordy, the compiler is trying to tell you something. Namely, that std::string variables can't be used in a strncmp (or other related) function. You have 2 alternatives (actually,... |
Forum: C++ Mar 13th, 2009 |
| Replies: 5 Views: 330 There are a number of things to look at in your code:
1) validAcctNumber - pretty close, though you should just remove passing of "size" and use your MAX_ACCOUNT constant.
2) checkAccountUsed -... |
Forum: C++ Mar 12th, 2009 |
| Replies: 5 Views: 330 On line 52, you are calling your function "checkAccountUsed(MAX_ACCOUNT, chk)" - I think you want to pass "val" instead of "MAX_ACCOUNT". If you look at the "if" statement in your "checkAccountUsed"... |
Forum: C++ Mar 12th, 2009 |
| Replies: 19 Views: 1,126 You are technically already running the program, so you really only need to check to see if the user doesn't want to run it:
if (answer == 'n')
return 0;
Otherwise, execution will continue. |
Forum: C# Mar 12th, 2009 |
| Replies: 9 Views: 1,168 Some things I'm reading seem to indicate that you cannot use the IDE to create a DataSet that is hooked to a remote SQL Server database. I don't happen to have VS 2008 Express, so I can't test that... |
Forum: C++ Mar 12th, 2009 |
| Replies: 2 Views: 333 First, look at your "tok_vals" variable - or what you're assigning to it - use backslashes.
Your counter routine is a bit off. You will never get to count the occurrences of the last item in your... |
Forum: C# Mar 12th, 2009 |
| Replies: 5 Views: 347 You can add an event handler for the button by using the following syntax:
this.buttonDec.Click += new System.EventHandler(this.buttonDec_Click);
Then, define your handler function somewhere in... |
Forum: C# Mar 11th, 2009 |
| Replies: 5 Views: 347 Actually, you can use control arrays, but you will have to build the TextBoxes (or any other controls) manually, rather than using the designer (unless someone out there knows a way!).
Here's some... |
Forum: C Mar 11th, 2009 |
| Replies: 8 Views: 534 If you don't mind including <arpa/inet.h>, you can use the htonl() function:
int newval = htonl(origval);
The "h" on the front is for "host" and the "n" is for network, "l" on the end for... |
Forum: C++ Mar 11th, 2009 |
| Replies: 17 Views: 621 Couple o' things:
1) Variables aren't initialized, then they are used (examined) later in the code. You will get unexpected results with this.
2) Your very first comparison ("if (WEIGHT <=100 &&... |
Forum: C++ Mar 11th, 2009 |
| Replies: 3 Views: 531 Unless I misunderstand the function, "mouse_event" is used to generate mouse events. If you want to find the mouse's current position, you would need to trap the message as it arrives.
What does... |
Forum: C# Mar 11th, 2009 |
| Replies: 3 Views: 261 If you'll notice, you specify "this.Controls". Those controls contain all of the controls on your form, not just the TextBox-es. You need to check the type of each control as you iterate over it,... |
Forum: C# Mar 11th, 2009 |
| Replies: 9 Views: 1,168 Just asking, but did you stop and restart Visual Studio after you did the install? |
Forum: C# Mar 11th, 2009 |
| Replies: 9 Views: 1,168 OK, perhaps you don't have the SQL Native Client installed. You can check the Control Panel to see if it is installed (once you open Control Panel, go to "Add or Remove Programs" or "Programs and... |
Forum: C++ Mar 11th, 2009 |
| Replies: 2 Views: 369 Take a look at line 63. There seems to be an extra character on the line ;) |
Forum: C++ Mar 11th, 2009 |
| Replies: 3 Views: 531 GetASyncKeyState just tells you whether a key is down. You need to get the mouse coordinates, and determine if they fall within your rectangle. For that, you will need to trap one of the mouse... |
Forum: C# Mar 11th, 2009 |
| Replies: 9 Views: 1,168 You can select "SQL Server" to connect to a local or remote SQL Server instance. From the "Data" menu, select "Add New Data Source", select "Database", press "Next", then press "New Connection". In... |
Forum: C# Mar 11th, 2009 |
| Replies: 8 Views: 1,084 The line you added to your initialization:
AppDomain.CurrentDomain.SetData("DataDirectory", "Path-to-Root-Folder");
the "Path-to-Root-Folder" value should be replaced with the actual path to where... |
Forum: C# Mar 11th, 2009 |
| Replies: 2 Views: 4,184 You can do it by creating public properties or methods on your new form (in your example, Form2). You would then show the form afterward.
Form2 myForm = new Form2();
myForm.setFilename = sFile; //... |
Forum: C# Mar 11th, 2009 |
| Replies: 8 Views: 1,084 Wow. I had the same thing happen to me - the "bin" folder version of the database vanished, and the only one left is the one in the "root" folder.
Not the greatest solution, but I added this line... |
Forum: C# Mar 10th, 2009 |
| Replies: 2 Views: 2,224 I can't be 100% sure, as I'm not sure where you're getting your data, but you don't seem to be doing anything with the "paramCollection" data structure. Shouldn't that be set somewhere in one of the... |
Forum: C# Mar 10th, 2009 |
| Replies: 1 Views: 249 If you mean that you want to manipulate an Excel workbook from a C# Windows app, then perhaps this link (http://dotnetperls.com/Content/Excel-Interop-Performance.aspx) will help. |
Forum: C# Mar 10th, 2009 |
| Replies: 8 Views: 1,084 OK, there's an issue with how VS2005 organizes the databases you add to a project. If you'll notice, there will be 2 databases in your project - one at the "root" level of your project, and another... |