Forum: C++ Apr 5th, 2009 |
| Replies: 4 Views: 328 |
Forum: C++ Apr 5th, 2009 |
| Replies: 14 Views: 1,042 You could tokenize (strtok) by "<" and stick each piece into a vector or so... then get it's size(). |
Forum: C++ Apr 5th, 2009 |
| Replies: 2 Views: 235 Because you never increment "n" anywhere. In your do while, you need to stick an n++ some place. |
Forum: C++ Mar 30th, 2009 |
| Replies: 9 Views: 1,164 Nah, in the overridden virtual wage() method, simply put something like cout << "Manager" in the Manager's method, and cout << "Casual" in the Casual's method.
Or make a virtual overridden method... |
Forum: C++ Mar 30th, 2009 |
| Replies: 9 Views: 1,164 |
Forum: C++ Mar 22nd, 2009 |
| Replies: 8 Views: 1,409 I hate suggesting things like this but you can use system:
system("word.exe"); |
Forum: C++ Mar 21st, 2009 |
| Replies: 3 Views: 362 Hmmmm isn't TotalSold supposed to be static? |
Forum: C++ Mar 15th, 2009 |
| Replies: 11 Views: 1,165 |
Forum: C++ Mar 15th, 2009 |
| Replies: 11 Views: 1,165 you can't put variables inside double quotes. That means it's a literal string then. You want the value of the variable, so you must take it out of the quotes..... You can't just take it out of... |
Forum: C++ Mar 15th, 2009 |
| Replies: 5 Views: 424 Why not just pass it to the object as a parameter? |
Forum: C++ Mar 15th, 2009 |
| Replies: 11 Views: 1,165 you can't concatenate it?
float Pi = 3.14;
system("AdjustSeaLevel.exe " + Pi + " 5.4 11.2 c f g");
or make a variable that contains the string to pass in, and then issue that?
#include... |
Forum: C++ Mar 15th, 2009 |
| Replies: 6 Views: 703 I suggest you use SDL_net (http://www.libsdl.org/projects/SDL_net/) For networking. The library is pretty much procedural, but writing a quick wrapper class so it behaves in an OOP manner is... |
Forum: C++ Mar 14th, 2009 |
| Replies: 9 Views: 412 |
Forum: C++ Mar 10th, 2009 |
| Replies: 4 Views: 554 Your loop, where you have buttons[i] = button... yeah, that doesn't create new instances of ButtonFoo. You are taking button[0] and pointing it to button. Then taking button[1] and pointing it to... |
Forum: C++ Mar 9th, 2009 |
| Replies: 4 Views: 632 Just remember scope when playing with those braces. If you declare something inside the braces, it will only exist between the braces:
int main(int argc, char **argv)
{
int a;
{
int a;... |
Forum: C++ Mar 8th, 2009 |
| Replies: 1 Views: 263 With a loop. If you are using windows, then focus on Getcursorpos, and Setcursorpos. |
Forum: C++ Mar 7th, 2009 |
| Replies: 1 Views: 329 A Structure in C++ is a class. The only difference between the struct keyword and the class keyword, is that by default struct makes all members not explicitly identified as public. A Class makes... |
Forum: C++ Mar 6th, 2009 |
| Replies: 8 Views: 682 You sure it's not WM_CLOSE? |
Forum: C++ Mar 3rd, 2009 |
| Replies: 2 Views: 1,240 You have gcc (The C compiler) installed, but not g++ (The C++ compiler). cc1plus is the binary you need, but it comes bundled with g++ (not gcc). Look for build-essential, or at a prompt apt-get... |
Forum: C++ Mar 2nd, 2009 |
| Replies: 6 Views: 1,080 *waves his hand like a Jedi*
You want to code an open source active directory clone..... |
Forum: C++ Mar 2nd, 2009 |
| Replies: 2 Views: 432 Well for one, you try to treat scores as an array of type int, but you declare it as a single int with size. (int scores, size). Guess you might want to pass it as a pointer or reference, but if you... |
Forum: C++ Mar 1st, 2009 |
| Replies: 2 Views: 374 First, there is going to be an issue with the fact that you use the word "string" as a variable.... yeah no. You included iostream, and are using the std namespace, so string is a type. Can you... |
Forum: C++ Mar 1st, 2009 |
| Replies: 12 Views: 628 I wonder if somehow the C++ program is introducing an EOF character prematurely. I strongly doubt it's a crlf \n issue (that is linux uses a different mechanism for new lines than does DOS/Windows).... |
Forum: C++ Feb 28th, 2009 |
| Replies: 1 Views: 295 Ok... What have you tried up to this point? (post some code <snip>) |
Forum: C++ Feb 28th, 2009 |
| Replies: 3 Views: 243 I normally don't like to post after such a great explanation, but it's sort of important to point out, that the lines are the implementation of the class. You have the class definition which... |
Forum: C++ Feb 26th, 2009 |
| Replies: 12 Views: 494 what does Inst = A(4); do? |
Forum: C++ Feb 24th, 2009 |
| Replies: 1 Views: 675 1) make sure you are adding a \n to the end of the data stream (I've found it to work).
2) Install wireshark. Then you can sniff the traffic on that port, and check all incoming and outgoing (ehem)... |
Forum: C++ Feb 24th, 2009 |
| Replies: 3 Views: 306 you need to compile your other .cpp's into .o's first... so something like
g++ -c marble.cpp -o marble.o then you should be able to add it into your compile line I guess like g++ vector_jar_test.cpp... |
Forum: C++ Feb 23rd, 2009 |
| Replies: 2 Views: 5,457 I would get the source code for like, linphone or some such, and see how they did it. There may even be a library to handle the SIP information for you. If not, you can at least see what they did. ... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 3 Views: 902 *mumbles something about find_last_of* |
Forum: C++ Feb 22nd, 2009 |
| Replies: 65 Views: 3,290 Nice. You are in vista like he is? |
Forum: C++ Feb 22nd, 2009 |
| Replies: 65 Views: 3,290 >i dont wish to run it "trough" my program, just as if i had found the destination and doubleclick'ed it.
I believe using system, execl, and the like, will force the C++ program to wait until the... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 15 Views: 904 first, format the code so that it uses proper indentation, and braces. That's the first step. |
Forum: C++ Feb 22nd, 2009 |
| Replies: 11 Views: 518 Just because something is syntactically accurate doesn't mean "there is nothing wrong with the code." An important thing to mention about code, is that you are supposed to make it easy to read. ... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 11 Views: 518 |
Forum: C++ Feb 22nd, 2009 |
| Replies: 2 Views: 339 edit curses.h and look around about line 559, and 1017 or so. My copy of curses.h, however includes this:
/* these names conflict with STL */
#undef box
#undef clear
#undef erase
#undef move... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 65 Views: 3,290 set shExecInfo.lpDirectory = to the path where your .bat file resides... |
Forum: C++ Feb 21st, 2009 |
| Replies: 65 Views: 3,290 And probably need to use \\ instead of \ |
Forum: C++ Feb 20th, 2009 |
| Replies: 65 Views: 3,290 int _tmain(int argc, _TCHAR* argv[]) to int main(int argc, char **argv), but I doubt that is going to make a big difference. Just so you know, in code::blocks IDE, windows XP SP2, this compiles (and... |
Forum: C++ Feb 19th, 2009 |
| Replies: 2 Views: 538 At the top of your header, you have:
#ifdef shape_h
#define shape_h that should really be ifndef. Why define it if it is already defined? ;)
Also, you don't have "draw" defined in your class... |