5,676 Posted Topics

Member Avatar for sathishkumar.e

[QUOTE=Duoas;479410]Cool [B]Narue[/B]! I didn't know that. (I suppose that's the kind of brain damage I get for having tried it years ago on some silly, ancient, broken DOS C compiler.) [B]Doublex[/B], how about this one: [inlinecode]printf( "%s", strcpy( "Stupider", "Stupid" ) );[/inlinecode] (results may vary).[/QUOTE] Results may crash!

Member Avatar for Duoas
0
134
Member Avatar for mikeandike22

[QUOTE=mikeandike22;473291]Hi im trying to take a .dat file with just a list of integers separated by lines. The program has to allow for whether or not the list is an even amount of numbers or not. im a bit stuck well what i want it to do is store the …

Member Avatar for mikeandike22
0
671
Member Avatar for dssn

Good for you. That is a fine program to use to learn fstream, arrays, and some math concepts. Good luck.

Member Avatar for ithelp
0
71
Member Avatar for cameron.kay

Set X=x+20 Add 20 to X Increment X by twenty 20 is added to X In other words, any way you want to word it.

Member Avatar for WaltP
0
102
Member Avatar for pedro martinez

Use the [icode]remove()[/icode] function. You have to find out where the file is and pass the path to the function.

Member Avatar for WaltP
0
92
Member Avatar for Jacky1
Member Avatar for ssjad05

[QUOTE=ssjad05;480493]oh sorry i forgot to mention that it suppose to print out the names and scores in ascending order.[/QUOTE] You did? Here's your first post. Read the first line: [QUOTE=ssjad05;480455]When it prints it does not print the numbers and names in ascending order like its suppose to do and i …

Member Avatar for WaltP
0
426
Member Avatar for phvan

[QUOTE=Lerner;480408]1) don't use eof() to control the loop.[/quote] Why not? Don't you think an explanation would be more helpful rather than simply dictating to posters? It might actually teach them something. [B]phvan[/B], [url=http://www.gidnetwork.com/b-58.html]see this[/url] ([ICODE]feof()[/ICODE] is identical to [ICODE].eof()[/ICODE]. [QUOTE=Lerner;480408]2) Read the file line by line using getline(), not >>. …

Member Avatar for WaltP
0
126
Member Avatar for driplet

It's been too long and ForTran has changed. If you explain what the arrays mean in FTN, we can probably give you more exact answers.

Member Avatar for WaltP
0
190
Member Avatar for boyz

[QUOTE=niek_e;480128]I disagree. If your oven has a conveyor belt build in to it, it would be possible to eat the first part of the pie, while the other part is still in the oven being baked. :)[/QUOTE] I [I]dare[/I] you to try it! :icon_twisted:

Member Avatar for WaltP
0
119
Member Avatar for johnnyjohn20

[QUOTE=johnnyjohn20;480425]wish i was good at this! humph!![/QUOTE] You will be. Hooray!!! Just takes practice...

Member Avatar for WaltP
0
274
Member Avatar for CaitlynCraft

[QUOTE=Duoas;478189]Your compiler lets you get away with it, but in C you should generally stick all variables before any code...[/QUOTE] Not [I]generally[/I]. It's [I]always[/I]. :icon_wink: [QUOTE=Duoas;480348]BTW. What happened to your nice [B][[I][/I]code[I][/I]][/B] blocks? (Only use [B][[I][/I]inlinecode[I][/I]][/B] for a single line of code.)[/QUOTE] There are no nice code blocks. I fixed …

Member Avatar for WaltP
1
1K
Member Avatar for nicz888

[QUOTE=nicz888;479539]3)i entered this input output 2 wrong input a wrong input s wrong input q quit[/QUOTE] Did you try my suggestion? Output various values at key spots in the program to see what values are not as expected. [QUOTE=nicz888;479539]4)when i enter q the i am surprise program ends, but when …

Member Avatar for Lerner
0
183
Member Avatar for cgraves

[QUOTE=cgraves;479742]let me know what you think[/QUOTE] Terrible. Never call [ICODE]main()[/ICODE]!!!! Use a loop. And CODE tags. They were mentioned in the rules you read when you registered. (You [I]did[/I] read them, didn't you?) Also, you have no repetition, no user defined functions, and no option to quit. You didn't follow …

Member Avatar for WaltP
0
112
Member Avatar for HLA91

You forgot a ; when you declared answer Please read the post Read Me: Read This Before Posting . It's called that for a reason.

Member Avatar for Ancient Dragon
0
115
Member Avatar for johny112

So what [I]have[/I] you figured out? Didn't you read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] and [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url] yet?

Member Avatar for johny112
0
223
Member Avatar for bhenneman

My only problem with Registry First Aid is the lack of ability to look at only a portion of the errors. Like when you get 400 errors you can't single out a certain type, nor can they be sorted. Other than that, it works well.

Member Avatar for WaltP
0
116
Member Avatar for Ancient Dragon

[QUOTE=iamthwee;478696]When are the old-style smilies gonna become obsolete? I say they should be, otherwise I might question why there was any point of having the new smilies commissioned.[/QUOTE] [QUOTE=jbennet;478699]agreed[/QUOTE] Disagree. [QUOTE=iamthwee;478777]I don't think the original smilies are consistent with the style of the rest of the site. You should get …

Member Avatar for MidiMagic
0
263
Member Avatar for ricnyx

[QUOTE=ricnyx;479529] what should i do to get the output i wish?[/QUOTE] By reading [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url], which has been suggested many times to you already. And you obviously missed [I][url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url][/I] too. [QUOTE=ricnyx;479529]pls help me ... im newbie .... just study c++ for a few week...[/QUOTE] And …

Member Avatar for Lerner
-1
108
Member Avatar for johnnyjohn20

Or, a little easier: [code] int main () { float b; float f = 123.457678F; float b = (int) (f + 0.5); cout << b; return 0; } [/code]

Member Avatar for WaltP
0
970
Member Avatar for johny112

What part of "Use code tags" did you not understand? ([url]http://www.daniweb.com/forums/post479400-2.html[/url])

Member Avatar for Ancient Dragon
0
87
Member Avatar for controlsi

[QUOTE=controlsi;479139]any in sight would be helpful. im really under the gun and have been trying to get this to work for a couple of days. thanks in advance David[/QUOTE] With what? You didn't mention anything was wrong. Did you read the post titled [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url]?

Member Avatar for WaltP
0
132
Member Avatar for tones1986

Look up the bubble sort. It's much easier than the selection sort. [QUOTE=tones1986;478934]Comments such as "you have no idea what you are doing", "you shouldnt code this or that its horrible" are NOT welcome. Im learning - you all learnt at some point too. So let me work at it. …

Member Avatar for vmanes
0
161
Member Avatar for nicz888

Here are some problems you should fix: [code] #include <cstdlib> #include <ctime> #include <iostream> using namespace std; // prototype and name space declaration bool testAnswer(int, int, int); void correctOutput(); void incorrectOutput(); bool mathTest(); //------------------------------------------------------------------ //------------------------------------------------------------------ //------------------------------------------------------------------ int main() { if (mathTest()) [color=red]// Just call mathTest. This IF is really confusing...[/color] …

Member Avatar for Ancient Dragon
0
130
Member Avatar for rajsharma_85
Member Avatar for Salem
0
145
Member Avatar for rodce

If you get 42, the universe will end! Hopefully, you code uses 2 nested loops -- FOR loops are best.

Member Avatar for WaltP
0
682
Member Avatar for r5ingh

[QUOTE=r5ingh;477577] im confused as to how to write an error checking function and how to write a decode function which decodes morse code. It cannot simply be a backwards of the encode function because ONE morse code is made up of FOUR characters...? (if you get what i mean?) i …

Member Avatar for r5ingh
0
470
Member Avatar for anshul.dilli

[QUOTE=anshul.dilli;477808]hi plz help me overcome [B]a few errors[/B] in my encryption project.... thanks[/QUOTE] Such as?

Member Avatar for anshul.dilli
0
112
Member Avatar for johnnyjohn20

[QUOTE=Jishnu;476478]By the way, you should have posted this in the C forum. There is nothing specific to C++ in this thread.[/QUOTE] There's nothing specific to C either. Other than he's writing a C++ program.

Member Avatar for vijayan121
0
109
Member Avatar for adikesan

This is not a question for a help forum. This is something you should get from a book, instructor, or tutorial. We can help once you understand the concepts.

Member Avatar for rajusankar28
0
124
Member Avatar for bilalb1

[QUOTE=ricnyx;478033]hehe....u free....can help me solve my problem??[/QUOTE] You waited an entire 9 minutes before bumping your post? C'mon, we don't [I]live[/I] on this board. Read the entire file into an array of strings and loop through them.

Member Avatar for bilalb1
0
744
Member Avatar for enuff4life

See the comment I added at the bottom of the code [CODE=C]int main() { length = strlen(string); boolean = IsPalindrome(string, 0, length); ... } int IsPalindrome (char* string, int left, int right) { if (left >= right) { return TRUE; } if (string == string) { return IsPalindrome(string, left+1, right-1); …

Member Avatar for WaltP
0
144
Member Avatar for gretschduojet1

However you want to make the file you want to read. Notepad is fine for text files. You can also write a program that accepts info from the user and writes it to a file for another program to read.

Member Avatar for WaltP
0
79
Member Avatar for dev.cplusplus

Aren't the posts [QUOTE][B]Read Me: [/B]C++ Books [B]Read Me: [/B]C / C++ FAQ's and Practice problems[/QUOTE] helpful?

Member Avatar for Ancient Dragon
0
101
Member Avatar for rogenie

[QUOTE=rogenie;470189]here is my code. I don't know why it always returns the value that i do not ask for.?? This code display the name I typed in if it is inside the array. [/QUOTE] Probably because you returned the value you didn't want. Because you didn't explain 1) what you …

Member Avatar for WaltP
0
128
Member Avatar for picklesandmayo

If you get errors, the technique to get help is to post the errors [I]exactly[/I] as you see them (cut & paste, don't retype). Based on he code [I]snippet[/I] you posted, you are only missing the randomizer[ICODE]srand()[/ICODE].

Member Avatar for picklesandmayo
0
125
Member Avatar for Sturm

[[I]Hard-handed response[/I]] If they've been told about the rules that many times, infract them! [/[I]Hard-handed response[/I]] :icon_twisted: I know it's not nice, but that's how I'm feeling today.:icon_redface:

Member Avatar for MidiMagic
0
497
Member Avatar for malathuis
Member Avatar for johnpmii

[QUOTE=johnpmii;476996]Hello, I'm tring to read a text file and pull pieces of the line into separate functions. I can open and close the file in the main. When I use the getline() it reads the whole line, I only want to read up to a certain point using strings instead …

Member Avatar for Duoas
0
161
Member Avatar for enes

[QUOTE=enes;477767]i want to to able to access to a class's vairable but this varible is not declared class's header file it is in the cpp file i couldn't write a method that acces to it because methods cannot access it(since the variable is not in the header file) how can …

Member Avatar for WaltP
0
105
Member Avatar for BigBen747

C'mon, guys. Stop telling him it's impossible! Ben, since you are new, you need a more detailed plan. #1) How do you envision access to the music. Files on disk? Streams off web? #1a) If files, for you know how to navigate a disk? #1b) If streams, do you know …

Member Avatar for WaltP
0
180
Member Avatar for propricer

[quote=purplegerbil]This is a bit basic but might help.[/quote] A bit [B]basic[/B]! LOL That's a good one!!!! :D [COLOR=RoyalBlue]See, BASIC is the language, so it struck me funny.... Oh, never mind!![/COLOR]

Member Avatar for alzowze
0
2K
Member Avatar for boyz

He doesn't. He just want attention by posting lame questions that are mostly unintelligible. He probably has refused to read The Rules and other helpful posts to aid in asking good, well formatted questions..

Member Avatar for WaltP
0
102
Member Avatar for mark0420
Member Avatar for rxylion

We love you too, but we're still not going to write your program for you. Read the recommended info here (rules, posts) and formulate a question we can answer.

Member Avatar for Ancient Dragon
0
124
Member Avatar for jrice528

"[I]User-specified[/I]" means you must be able to read "[url=http://www.gidnetwork.com/b-45.html]command line arguments[/url]" and convert the arguments to integers. The program will be run with a command similar to: [icode]progname lowval highval[/icode] Then in the code grab [I]lowval[/I] & [I]highval[/I] (which will be c-strings) and use them.

Member Avatar for vmanes
0
116
Member Avatar for vegaseat

Let's see. "[B]A multilingual coded Hello World! thread[/B]". In BASIC: [code] print "Hello Wereld" ' Dutch print "Hello World" ' English print "Bonjour Monde" ' French print "Hallo Welt" ' German print "Γειάσου κόσμος" ' Greek print "Ciao Mondo" ' Italian print "Hello Mundo" ' Portugese print "Здравствулте! Мир" ' …

Member Avatar for sgssergio
0
1K
Member Avatar for subtronic

[QUOTE=Real-tiner;105345]And I need real time programming with millisecond accuracy, which Microsift has taken away.[/QUOTE] M$ hasn't taken it away. It was never in Standard C in the first place so it was compiler dependent. I believe there is an API to handle what you want, which means it would be …

Member Avatar for menonsr
0
933
Member Avatar for Salem

[QUOTE=Lardmeister;475175]Good grief, nobody would ever use the same computer for ten years! One exception, maybe the government does for flight control.[/QUOTE] Nobody? You don't know the people I know...

Member Avatar for vegaseat
0
75
Member Avatar for alcoheca

[QUOTE=alcoheca;475370]Still having problems, and the culprit is definelty the string.erase modifier. Does this modifier have to be called by reference ( I mean by a pointer to a string) and the other statements like newstr[i] do that by default? Is that the problem? At the moment [B]newstr.erase(j)[/B] // j=8 wipes …

Member Avatar for alcoheca
0
117

The End.