2,384 Posted Topics

Member Avatar for Coding Mage
Member Avatar for MIGSoft

Mine was already taken, so here are a couple of loftovers. [quote]Sometimes when I reflect on all the beer I drink I feel ashamed. Then I look into the glass and think about the workers in the brewery and all of their hopes and dreams. If I didn't drink this …

Member Avatar for carolraydon
0
658
Member Avatar for aholliker

[url=http://www.daniweb.com/techtalkforums/announcement8-2.html]Announcement: We only give homework help to those who show effort[/url]

Member Avatar for ShawnCplus
0
105
Member Avatar for iamthwee

Infinite recursion? [code] if ( crap[i] == '-' ) { crap.replace(i,1," - "); [COLOR="Blue"]i += 2;[/COLOR] } [/code]

Member Avatar for iamthwee
0
201
Member Avatar for ethompson

You'll have to actually write your sorting function and call it correctly, using an array.

Member Avatar for ~s.o.s~
0
2K
Member Avatar for bkaau

[url=http://www.daniweb.com/techtalkforums/announcement8-2.html][U]Announcement[/U]: We only give homework help to those who show effort[/url]

Member Avatar for WolfPack
0
232
Member Avatar for gampalu

[QUOTE=~s.o.s~]lol maybe this is what you are looking for system("pause");[/QUOTE]Yes, a more vulnerable and less portable solution is always better than a safe, portable one. :lol: :rolleyes:

Member Avatar for Dave Sinkula
0
117
Member Avatar for complete

[url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url]

Member Avatar for Dave Sinkula
0
56
Member Avatar for aeinstein

[aside] I tend to agree with 'Dragon here. Like comments that don't match the code, a flowchart may not match the implementation code. And then you get to debug in two places -- the flowchart and the actual code. Which one is correct? Bleah. And the implementation always seems to …

Member Avatar for iamthwee
0
363
Member Avatar for ostkaka

Life will be simpler if you [I]always[/I] take user input as a [INLINECODE]std::string[/INLINECODE] using [INLINECODE]getline[/INLINECODE] (and later convert it to a number if need be).

Member Avatar for Dave Sinkula
0
105
Member Avatar for -jOHn BeneDict-

[QUOTE=Shadowhawk]Yes, but [B]fflush(stdin);[/B] will do as well...[/QUOTE]No! No! No! No! No! NO!!! [url]http://c-faq.com/stdio/stdinflush.html[/url]

Member Avatar for Zababa
0
135
Member Avatar for chillharsh

Are you reading [I]How to Program for the 1970's[/I]? Googling will get you the answer you are seeking, but then after you know it, don't ever use it for programming today or in the future -- use a temporary variable. Solving yesterday's problems today is useful to understand the techniques, …

Member Avatar for sukhi
0
480
Member Avatar for Laiq Ahmed
Member Avatar for Dave Sinkula
0
182
Member Avatar for TJW

You've got a 3-element array. Why are you trying to manipulate 4 elements?[code]#include <iostream> int main() { int array[] = {1,2,3}, *ptr = array; for ( std::size_t i = 0; i < sizeof array / sizeof *array; ++i ) { std::cout << "array [ " << i << " ] …

Member Avatar for Dave Sinkula
0
194
Member Avatar for Dave Sinkula

When I'm scrolling through a post that contains a block of code, I get a leftover line in the block with each scrolling. Firefox 1.5.0.4, Win2k SP4.

Member Avatar for hollystyles
0
172
Member Avatar for amitkumar2982

[quote] Re: 32 BIt Flat Real mode [COLOR="Magenta"]Jan 27th 2006, 09:48 AM[/COLOR][/quote]Let sleeping threads lie.

Member Avatar for Dave Sinkula
0
238
Member Avatar for conryf
Member Avatar for Dave Sinkula
0
122
Member Avatar for kakeen

Posting a complete example is always preferred. Check whether or not the argument to [INLINECODE]sqrt[/INLINECODE] will be a negative value to avoid issues.

Member Avatar for DavidB
0
119
Member Avatar for winbatch
Member Avatar for dev.cplusplus

What have you tried so far? There are RFCs and standards out there that may help decsribe the encodings, but I have not worked much with them.

Member Avatar for dev.cplusplus
0
307
Member Avatar for kakeen

return is a keyword, so it cannot be the name of a variable.[code]char return;[/code]You seem to be missing a variable name here.[code]int == 0;[/code]And == is comparison, not assignment or initialization. This is surely hosed.[code]switch ( choice )[COLOR="Magenta"];[/COLOR][/code]This is missing the closing quote.[code]printf("\n\t1 1);[/code]And this needs work too.[code]for ( FiboDisp …

Member Avatar for WaltP
0
138
Member Avatar for huffstat

[url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046380353&id=1044780608[/url]

Member Avatar for huffstat
0
115
Member Avatar for bigdill
Member Avatar for sgriffiths
Member Avatar for Ricky_v.s_C++

[QUOTE=andor]Here is an idea. Convert to char *[/QUOTE]Bad idea (unless you care to elaborate). Often using division (/) and remainder (%) operations is used for homework.

Member Avatar for Ricky_v.s_C++
0
400
Member Avatar for happygeek

My link is right to C and C++. [url]http://www.daniweb.com/techtalkforums/forumdisplay.php?s=&daysprune=&f=8[/url] I rarely see the home page. I visit other forums, some of the Coffee House stuff, via the menu or the Forum Jump. [edit]Hmm. Speaking of the menu, is there a way to have the Code Snippets or Tutorials also have …

Member Avatar for Dani
0
65
Member Avatar for Tester99
Member Avatar for slacke

[code]while (! readfile.eof())[/code][url=http://www.daniweb.com/techtalkforums/post155265-18.html]Avoid Loop Control Using eof()[/url]

Member Avatar for Dave Sinkula
0
101
Member Avatar for squirrel

Simplify first, then move on. [code]#include <stdio.h> #include <string.h> int main(int argc, char *argv[]) { if ( argc > 1 ) { char filename[FILENAME_MAX]; strcpy(filename, argv[1]); strcat(filename, "_new"); printf("filename = \"%s\"\n", filename); } return 0; } /* my output filename = "myprog_new" */[/code]

Member Avatar for squirrel
0
259
Member Avatar for thlegendkiller
Member Avatar for Darkmeerkat

You really want to separately compile and then link each compiled output. I'm not too sure of the syntax, but something like this:[code]$ g++ -Wall -o test main.cpp test.cpp[/code]Don't #include source in other modules. And I don't think you want to call your executable test.

Member Avatar for Darkmeerkat
0
97
Member Avatar for ~s.o.s~

If you want to change a value in a called function, you need to pass a pointer to the value. If what you want to change [I]is[/I] a pointer, you need to pass a pointer to the pointer.

Member Avatar for ~s.o.s~
0
119
Member Avatar for molayos
Member Avatar for Dani

[QUOTE=WolfPack]One Ring to Rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them. Lord of the Rings - page 272[/QUOTE]Ever seen Chris Torek's [URL="http://web.torek.net/torek/c/expr.html#therule"][I]The Rule[/I][/URL]?[quote][I]One Rule to ring them all One Rule to find them One Rule to point them …

Member Avatar for WolfPack
0
342
Member Avatar for HelmsK85
Member Avatar for huffstat

A Win32 Console Application expects [INLINECODE]main[/INLINECODE] to be defined somewhere.

Member Avatar for Ancient Dragon
0
432
Member Avatar for neeludhiman

Google and Wikipedia make good starting points for such questions. [url]http://en.wikipedia.org/wiki/Base64[/url]

Member Avatar for Dave Sinkula
0
89
Member Avatar for Alphabetized

[QUOTE=Alphabetized]Anyhow, i notice that all the programs I write open up in DOS, and my book doesnt say nething on how to change this.[/QUOTE]Well, I'd say first learn to understand the difference between a console application and a GUI application. A black rectangle does not equal DOS. Doing graphics requires …

Member Avatar for ~s.o.s~
0
132
Member Avatar for Acidburn
Member Avatar for Woobag

[QUOTE=Drowzee]The first version you posted is explicit, and, in my limited experience, is unnecessary. Just use the second version if you have no input arguments; there's no difference.[/QUOTE]There is a difference between the two in C or C++. [url]http://david.tribble.com/text/cdiffs.htm#C99-empty-parm[/url]

Member Avatar for Drowzee
0
153
Member Avatar for kahaj

It's running just fine. [url]http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1043803465&id=1043284385[/url]

Member Avatar for Dave Sinkula
0
179
Member Avatar for winbatch

Shouldn't there be a little more code in between there? [url]http://beej.us/guide/bgnet/output/html/syscalls.html#accept[/url]

Member Avatar for kris.c
0
167
Member Avatar for server_crash

My usual advice: avoid [INLINECODE]scanf[/INLINECODE]: [url=http://www.daniweb.com/tutorials/tutorial45806.html]User Input: Strings and Numbers [C][/url] (And in the snippets links, I do show some things, such as [url=http://www.daniweb.com/code/snippet357.html]this[/url].)

Member Avatar for WolfPack
0
850
Member Avatar for nammi_aqua
Re: help

[url]http://eternallyconfuzzled.com/tuts/bst1.html#delete[/url]

Member Avatar for Dave Sinkula
0
54
Member Avatar for kris.c

It will write the contents of buff up the the null. Assuming that it is a char array as opposed to a string, and the char array contains embedded nulls, you will get less output than expected. Perhaps use [INLINECODE]fwrite[/INLINECODE] instead.

Member Avatar for Dave Sinkula
0
138
Member Avatar for freemind

freemind: You know that you're not supposed to put function bodies or variable definitions in a header, right? (Well, now you do.) I may actually help more later on, but there are many things that make this code difficult to look at and understand. So I'm taking my time.

Member Avatar for Rashakil Fol
0
273
Member Avatar for ds_matrix

[INLINECODE]fflush(stdin);[/INLINECODE] Un-oh. 6000 or 1000? Could you attach the file to be sorted? What the heck is a supposed to be?[code]char a[0][1000];[/code]Does this compile for you? (Please compile C code with a C compiler.)

Member Avatar for Rashakil Fol
0
121
Member Avatar for yuelabtina
Member Avatar for angle188.shroff

While my crystal ball is out for polishing, why not post the lines of code associated with these errors?

Member Avatar for Dave Sinkula
0
474
Member Avatar for JC_McGeekster

Is your OS actually DOS? (As opposed to a command shell within Windows which is not DOS?)

Member Avatar for JC_McGeekster
0
253

The End.