79 Posted Topics

Member Avatar for geekme

When it comes to compilers for linux, gcc is the most common, and it comes installed with ubuntu.

Member Avatar for chrjs
0
97
Member Avatar for papayrus

I you can't use a switch statement on strings, you have to use an if and else ifs [CODE]void ListBoxFrame::OnButton3Click(wxCommandEvent& event) { wxString s; for (int i = 0; i < ListBox1.IsSelected.Count; i++) { s = ListBox1.IsSelected[i].ToString(); if (s == "Foobar") wxLogMessage(_T("Listbox item foobar selected")); else if (s == "Bazquirk") …

Member Avatar for chrjs
0
117
Member Avatar for crapgarden

I am not sure what you mean by "gaming terms" or "how does that translate over to online gaming", but it is not entirely right, technically it would be ... -object file [B]-linker[/B] -executable there is also the debugging processes, but that doesn't really follow a linear order like the …

Member Avatar for jonsca
1
186
Member Avatar for lochnessmonster

I believe that on a 32-bit machine 1 assembly command is equal to 32 bits (4 bytes), and on a 64-bit machine 1 assembly command is equal to 64 bits (8 bytes), etc. I am not exactly sure if that is right, but I think it is.

Member Avatar for thelamb
0
193
Member Avatar for knight92

[QUOTE]Also people say C/C++ are multiplatform but then any compiler for any language converts the code written by human into machine code i.e "01010101" then why is it that visual basic is not compatible with mac or linux once compiled ?? I just dont understand how C/C++ is so much …

Member Avatar for Adak
0
364
Member Avatar for miturian

The first example you gave does not actual write anything in binary, ios_base::binary does not actually change how the data is written to the file. It is just an indicator that you are going to put binary data into the file, but [ICODE]outfile << 1234 << " " << 5678 …

Member Avatar for miturian
0
187
Member Avatar for winky

NCTKID1, what is the purpose of your three posts on this thread? To me they don't seem like they would help anyone, considering all you are doing is post some code that is a complete alternative to the original posters code. And even if it did help him, did you …

Member Avatar for chrjs
-2
3K
Member Avatar for Hayzam_#include

The variables IP and Address are not strings, like they should be, they are integers. You should make them cstrings or std::strings. Also, on lines 22 and 28, you are just calling the system() function with "ping IP" and "ping Address", it does not actually replace "Address" and "IP" with …

Member Avatar for pseudorandom21
0
151
Member Avatar for RodEsp

at line 42, you can't declare a variable in c in the middle of the program, all variable declarations have to be at the beginning of the code. Also, you can't use a non-constant variable to initialize the size of the array inside brackets. Even if you could do that, …

Member Avatar for RodEsp
0
1K
Member Avatar for wondernaet

Any array is just a pointer to the first element of the array, and when you dereference and element in the array with the brackets like [ICODE]arr[i];[/ICODE] it is the exact same thing as [ICODE]*(arr + i);[/ICODE] The amount of elements in the array just means that the pointer is …

Member Avatar for VernonDozier
0
115
Member Avatar for JudeV

you should probably use && instead of || on the 4th line. Also, on the 8th line you should calculate how many minutes to add, instead of just adding 1 (the user could enter 1000 seconds or something like that.) and after that you should change the seconds to fit …

Member Avatar for JudeV
0
88
Member Avatar for prgrmmngaccnt

you are reading the binary representation of an integer instead of the decimal representation of an integer. [ICODE]result = fread(&num_cust[0], sizeof(int), 1, fp);[/ICODE] reads however many bytes the size of an integer is (on most computers, that is 4 bytes.) So assuming a 4 byte integer, the function would read …

Member Avatar for prgrmmngaccnt
0
162
Member Avatar for ckocina

The prototype for addBigInt is illegal, the parameter has to have a type. Also, shouldn't you be passing in two BigInt classes if you want to add them, and return one two. Something like: [CODE]BigInt addBigInt(const BigInt& bi1, const BigInt& bi2);[/CODE]

Member Avatar for ckocina
0
99
Member Avatar for jhollie

In addition to not using code tags, you posted a ridiculous amount of code, no one is going to bother looking through that to find an unspecified problem.

Member Avatar for chrjs
-1
143
Member Avatar for harry.jhone

If you are asking if there is a program that basically writes all the code for you, the answer is no. There are code-snippets that you can find online or in Flash's AS editor, but there isn't anything that "suggest[s] action script [for] the game in each & every part"

Member Avatar for chrjs
0
89
Member Avatar for sara113
Member Avatar for chrjs
0
106
Member Avatar for zarbhebz_1012

you should get the time before you call cin, then check after cin to see if the user took too much time to enter their answer. probably something like:[CODE]clock_t starttime = clock(); cin >> userans; if ( (clock() - starttime) * CLOCKS_PER_SEC > 20) { //took to long to answer …

Member Avatar for WaltP
0
140
Member Avatar for AnonymousX

It depends on how the text in the editor is stored, but I am going to assume you are using 1 giant buffer. In that case, you would loop through the characters and every time you hit a newline character you would check to see if you reached the line …

Member Avatar for chrjs
0
349
Member Avatar for DJSAN10

in C, the keyword const doesn't exist, but it does in C++. #define is used often in C to declare a name for a value that doesn't ever change throughout the execution of the program. This makes it easier to change values that are used over and over again.

Member Avatar for DJSAN10
0
136
Member Avatar for Nandomo

A linked list is a series of objects that are linked together because each object points to the next. [CODE]//a basic structure for a linked list typedef struct linkedList { int data; linkedList* next; //points to the next linkedList struct } linkedList;[/CODE] I found this online: [url]http://cslibrary.stanford.edu/103/[/url] I didn't really …

Member Avatar for Nandomo
0
96
Member Avatar for tupac03

You should build a 8.5 bit computer, it would run faster. And I like how you replied to a thread that was started by you, more than a year ago.

Member Avatar for chrjs
-3
116
Member Avatar for chamnab

vivek.kumar: your code is good, but you forgot the void before the function definition and you forgot the '\0' for split2. And I would add a parameter for the delimiter that you use to split the strings. [CODE]void split(char *original, char * split1, char * split2, char delim) { int …

Member Avatar for chrjs
0
108
Member Avatar for RolandTheNerd

There 3 primary elements of creating a game. 1. Design - Normally pretty straightforward, but you should put good amount of effort into the design of the game before doing anything else. 2. Media - Essentially creating all the 2d images and 3d models and so-forth that you will need …

Member Avatar for gusano79
0
180
Member Avatar for spetro3387

I don't know much about libQGLViewer, but you could try keeping viewer local and just making a variable that points to viewer global, and call updateGL using that pointer.

Member Avatar for spetro3387
0
160
Member Avatar for dynamyt3

I am not exactly sure what you are asking, but I think you should try using recursion to call the function for all the surrounding cells.

Member Avatar for chrjs
0
156
Member Avatar for mackemforever

The if statement and do-while statements are mixed up. Basically, you wrote [CODE]do { if (/*expression*/) { /* some code */ } while ( /*expression*/ ); } [/CODE]

Member Avatar for chrjs
0
149
Member Avatar for FL Botanist

This is the function with the warning, to my understanding [QUOTE][CODE]char *num2Pstring( number ) int number; { int place = 0; int hundreds, tens, units; char string[5]; string [ place++ ] = 'P'; hundreds = number / 100; number = number - ( hundreds * 100 ); tens = number …

Member Avatar for FL Botanist
0
251
Member Avatar for newC

the %4d is saying that the string that this represents cannot exceed 4 characters, while %d would be as many characters as necessary. [QUOTE][CODE]r = (unsigned long) a; int gb = (int) ( r / ONEGB ); r -= gb * ONEGB; int mb = (int) ( r / ONEMB …

Member Avatar for chrjs
0
126
Member Avatar for tomtetlaw

Usually when the object is completely black it means that either the file does not have any normals/diffuse data, or your program doesn't have any lighting.

Member Avatar for chrjs
0
247

The End.