Posts
 
Reputation
Joined
Last Seen
Ranked #264
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
93% Quality Score
Upvotes Received
30
Posts with Upvotes
28
Upvoting Members
24
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
23 Commented Posts
0 Endorsements
Ranked #224
~172.33K People Reached
Favorite Tags

279 Posted Topics

Member Avatar for Nikhar

You put a backslash in front of the special character (the double-quote or the other backslash) in order to remove its specialness and simply display it as is. Try this: [icode]cout << "\"\\n\"" << '\n';[/icode]

Member Avatar for rubberman
0
2K
Member Avatar for OmniX
Member Avatar for homeryansta

You do not have enough disk space to save the pre-compiled headers (PCH file). Delete some files and try again. It is beside the point that your other files compiled nicely. This problem has nothing to do with your code.

Member Avatar for Syed Zuman
0
969
Member Avatar for veronicak5678

Or do it in one step: [code] For each char in str: If it's a space: * Remember that you saw a space, but don't copy it to the output string. Else (if it's not a space): * If it's not leading space: * Copy a space to the output …

Member Avatar for bridgett.grace
0
2K
Member Avatar for lara_

Narue: "Posers should know their limits." You say it's rude to resurrect old threads but you're rude whenever you feel like it. One of the rules of this forum is "keep it pleasant". You are not following that rule. It's sad how a relatively simple skill like programming can go …

Member Avatar for nootan.ghimire_1
0
7K
Member Avatar for mariners95

You only need to loop through less-than-half of the matrix since in each execution of the inner loop you're swapping two elements (and the main diagonal stays put). If you iterated through the whole matrix, you'd just put it back the way it started. Starting j at i+1 loops through …

Member Avatar for johnnew
0
400
Member Avatar for UGndLord

wherex, wherey, gotoxy are all Borland extensions. (Do Borland compilers still support them?) You can learn how to do it using the OS functions directly yourself.

Member Avatar for Narue
0
3K
Member Avatar for moshe12007

[QUOTE=moshe12007;807837]I read 3 c++ books on dos[/QUOTE] Now that you're a DOS expert, the world is your oyster!

Member Avatar for mrnutty
0
191
Member Avatar for 2008macedonkon3

They are all "floating point" types. "double" is basically short for "double float" (but you can't say that). A float is usually 32 bits long whereas a double is 64 bits. A long double can be anywhere from 64 (same as double) to 128 bits. I hear "C++ from the …

Member Avatar for Kanoisa
1
2K
Member Avatar for respondto

Programmers do not use "word wrap". Try hitting "Enter" once in a while.

Member Avatar for NathanOliver
0
2K
Member Avatar for scrypt3r

Here's one way to find the PID from the exe filename. [code] #include <windows.h> #include <tlhelp32.h> DWORD PID_from_EXE (char *exe_name) { DWORD ret = 0; PROCESSENTRY32 pe32 = {sizeof (PROCESSENTRY32)}; HANDLE hProcSnap = CreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0); if (hProcSnap == INVALID_HANDLE_VALUE) return 0; if (Process32First (hProcSnap, &pe32)) do if (!strcmp (pe32.szExeFile, …

Member Avatar for anjana.ananth
0
168
Member Avatar for xonxon

There would seem to be method in such madness. But, as Narue said, you cannot entirely solve the tree without an inorder traversal as well. The problem should be solved recursively, as you might expect. [code] pre: C B A E D F H post: A B D H F …

Member Avatar for mrnutty
0
142
Member Avatar for beanryu

Do you just mean something like this? [code] test: [i]dependencies[/i] gcc prog1.c -o prog1 gcc prog2.c -o prog2 [/code]

Member Avatar for er_mv
0
231
Member Avatar for tones1986

Someone might actually look at your code if you post it as a single zip file. Edit your previous post if possible.

Member Avatar for Vincenttalent
0
169
Member Avatar for user98

The code looks reasonable, except that "and"ing with 0x0fff and 0xffff does nothing in this situation (assuming 16-bit shorts). Removing those will change nothing, however. I would check the "answer" you've been given before going any further. Your code may be just fine. As for test_crc, there is no reason …

Member Avatar for Salem
0
294
Member Avatar for jupkw

Can you install a newer version of the TurboC compiler? Or can you switch to a better IDE/compiler like MSVC++ or Codeblocks?

Member Avatar for vj4u99
0
256
Member Avatar for kelechi96

When Knuth talks about random numbers he mentions a CD of random numbers called "Black and White Noise" which is a mixture of deterministically sampled rap music combined with white noise.

Member Avatar for jephthah
0
456
Member Avatar for kbmmartin

sid> Just check what would happened if delete would reset the pointer to zero: Nothing would happen! Are you a mindless idiot? Did your brain fall out? Did you replace it with a turd you found on the ground? delete does nothing if it's passed a zero pointer! Moron! I …

Member Avatar for siddhant3s
0
6K
Member Avatar for Duki

The whole point of prefix notation is to represent the formula in such a way as to eliminate the complications of precedence and association. To reinstate these complications is sidiotic. I feel the most likely case here is that you are misunderstanding the assignment. It makes perfect sense to process …

Member Avatar for Duki
0
486
Member Avatar for drjay1627

I don't understand the question. Perhaps if you describe what you are trying to do. In general, people seem to be overusing strtok. Often it's not the way to go. Your's looks like a job for sscanf or fscanf, but it is hard to tell without more info.

Member Avatar for drjay1627
0
167
Member Avatar for claydo

main must return int (not void). You are missing a closing brace. "five" is a strange name. datum is spelled with a u. See comments in program. [code] #include <iostream> #include <fstream> #include <vector> using namespace std; struct five { float column1, column2; }; // Does not need to be …

Member Avatar for claydo
0
257
Member Avatar for BruenorBH

ThreadTime does not have access to hWndDlg. You need to either make it global (DlgProc would set the global var in WM_INITDIALOG)or pass it as a parameter to ThreadTime.

Member Avatar for BruenorBH
0
250
Member Avatar for ELewis08

This: [icode]void FindcarVin(int , string , string, int , int );[/icode] is not the same as this: [icode]void FindcarVin ( int vinnums[], string brandnames[], string modelnames[], int yearnums[], int specnum )[/icode] See the difference? It's always best to copy the definition's signature, both to ensure the prototype is the same …

Member Avatar for ELewis08
0
178
Member Avatar for kaseem724

Instead of a bunch of parallel arrays like this: [code] int vin[SIZE]; string brand[SIZE]; string model[SIZE]; int year[SIZE]; int mileage[SIZE]; double mpg[SIZE]; [/code] try a single array of structs like this: [code] struct Car { int vin; string brand; //etc. }; Car car[SIZE]; [/code] And all your function signatures become: …

Member Avatar for nucleon
0
142
Member Avatar for EMUGOD

> the lack of any apparent connection makes me think i'm initiating > something else (one of the libraries or something from the OS) > that has a run-time error Although possible, you should consider this as a last resort. Otherwise it will dull your mind to the more likely …

Member Avatar for EMUGOD
0
174
Member Avatar for hurbano

Minimally you must handle single quotes, double quotes, single-line comments, and multi-line comments, since, as ArkM has pointed out, these constructs may contain parens (etc.) which you will want to ignore.

Member Avatar for nucleon
0
145
Member Avatar for paolomontero

The best solution is always the simplest one that does the trick. So, since you're only instantiating it with one type (i.e., a Comparable and it's derivatives), you don't need a template. That's what JohnA was saying. [code] class Comparable { public: virtual int compare( const Comparable& c ) const …

Member Avatar for paolomontero
0
191
Member Avatar for xVent

So you're saying that if you take the exact same exe and config file that works on your machine and transfer it to your friend's machine, it doesn't work? Does he have the exact same OS as you? Has he installed your program in the same way as you have?

Member Avatar for Ancient Dragon
0
125
Member Avatar for niku4u

Such flat, lifeless code. Why? No code tags! ;) You're reading over and over to the same part of the buffer (and zeroing it before every read). Move the zeroing (if necessary) outside the loop, and either move along the buffer (read into buffer+size) or do the file operations on …

Member Avatar for niku4u
0
493
Member Avatar for Valaraukar

You need to declare your object array like this: [code] typedef struct Object3D { int** facets; float** vertices; int nFacets; int nVertices; } Object3D; Object3D *object; // Object array int numObjects; // Number of objects in object array [/code] And the object array is accessed like this: [icode]object[nObj].nFacets[/icode] At this …

Member Avatar for Valaraukar
0
290
Member Avatar for astonomer

We need [url=http://www.daniweb.com/forums/misc-explaincode.html]code tags[/url] and more explanation.

Member Avatar for skatamatic
0
129
Member Avatar for BruenorBH

You haven't associated the menu with the dialog. Add this line after the FONT line in the dialog definition: [icode]MENU IDR_MAIN_MENU[/icode]

Member Avatar for nucleon
0
164
Member Avatar for slim2hott

Write it to a string with sprintf (or wsprintf): [code] sprintf( buf, "Random Number: %d", random_integer ); MessageBox( 0, buf, ... ) [/code]

Member Avatar for slim2hott
0
157
Member Avatar for gmark

It's quite a challenge decoding a binary file with an unkown format! In general, it's not possible. How do you know if the first two bytes are the characters AB or the 16-bit integer with decimal value 1106 (assuming an ascii representation)? You might want to view the file in …

Member Avatar for gmark
0
2K
Member Avatar for crh0872
Member Avatar for Shmera
Member Avatar for Ancient Dragon
0
387
Member Avatar for booker

WH: You're saying that the code below does not crash on your system? [code] #include <iostream> int main() { int matrix[512][512][512]; matrix[0][0][0] = 1; std::cout << matrix[0][0][0] << '\n'; } [/code] Assuming 32-bit ints, that's half a gigabyte! Removing the 3rd dimension works for me, but that's only a megabyte.

Member Avatar for tux4life
0
225
Member Avatar for bunnyboy

The obvious thing wrong with your program is this line: [icode]pid = (int)getpid(); int ppid = (int)getppid();[/icode] You are defining another variable called ppid, shadowing the other one. You want to remove "int" before ppid.

Member Avatar for bunnyboy
0
115
Member Avatar for skisky

You want to look at [url=http://www.cplusplus.com/reference/algorithm/lower_bound/]lower_bound[/url]. It has the same complexity as binary_search (and also needs a sorted list). But it returns an iterator.

Member Avatar for skisky
0
92
Member Avatar for BruenorBH

> I am seeing 2:00 pm listed as "2:00 pm", '\0' <repeats 17 times> Is the size of the buffer 25? Those zeros are normal. But in general, you can't use strncpy like that. It will not null-terminate the strings. To use it as a substring operator, you must do …

Member Avatar for nucleon
0
145
Member Avatar for Siaa

I don't know if the following image will show up, but you could maybe write something to guesstimate the number of galaxies in this little picture, but certainly not the number of start in a galaxy. You should check the assignment specs. [img]http://img147.imageshack.us/img147/1565/galaxies.jpg[/img]

Member Avatar for nucleon
0
383
Member Avatar for Trendkiller

Your structure is wrong. Your main should be something like this: [code] int main (void) { /* Init count of words and count of palindromes to zero */ /* Open files */ /* While reading next word does not give EOF */ /* Increment count of words */ /* If …

Member Avatar for Trendkiller
0
273
Member Avatar for zoner7

[code] struct WordCatch words[256]; unsigned char S[256]; unsigned char K[256]; unsigned char A[256]; // Alice's generated keystream char buffer1[100]; char buffer2[10]; char passwd[] = "5ne10nemo"; char temp[2]; int c, i, j, k, t, N, x, y, n; int wordCount = 0; int lineCount = 1; int beginning, ending, current; FILE …

Member Avatar for nucleon
0
116
Member Avatar for pranjalkumar

ddanbe> I would reserve more bit space for the mantissa. Maybe it's a "special purpose" trade off: massive range at the expense of precision. Purpose unspecified. ;) But the OP may be confusing mantissa and exponent. In the usual types, the mantissa always has more bits than the exponent. Here's …

Member Avatar for nucleon
0
137
Member Avatar for BruenorBH

IDC_EASTERN_TIME is (presumably) an integer control id. You need an HWND to pass to SetWindowText. If you have an hwnd to your dialog (or whatever) window, try this: [icode]SetWindowText ( GetDlgItem ( hwndDialog, IDC_EASTERN_TIME ), cETime );[/icode] Also, cETime has too-little space allocated to it. It should be at least …

Member Avatar for BruenorBH
0
333
Member Avatar for Clockowl

This compiles, but there's got to be a better way. It's probably not generally worth it in this case. [code] #include <fstream> #include <string> #include <map> namespace sss { using namespace std; class node { public: multimap<string, string> values; multimap<string, node> children; }; typedef pair<string, string> value; typedef pair<string, node> …

Member Avatar for ArkM
0
92
Member Avatar for JimD C++ Newb

You do not need multi-threading for this task. Your program proceeds in lockstep because your I/O calls are of the "blocking" type and you are calling them without knowing that they are "ready". If they are not ready, they'll wait until something is ready to return. This includes fgets, which …

Member Avatar for JimD C++ Newb
0
433
Member Avatar for trickiscool

You just want one call to [icode]srand((unsigned)time(0));[/icode]. Put it as the first statement in main and remove it from everywhere else (it's in two functions now).

Member Avatar for trickiscool
1
182
Member Avatar for viki0077

You may not actually want to wait in real time. You would normally do that only for a realtime animation of the process. It depends on what output you want. You seem to just want a line by line output of what happens after each input event. Each input event …

Member Avatar for tux4life
0
8K
Member Avatar for Clockowl

You need to use [b]typename[/b]. [icode] for ([color=red]typename[/color] vector<T>::iterator it = x.begin(); it != x.end(); it++) {[/icode]

Member Avatar for siddhant3s
0
2K

The End.