5,676 Posted Topics
Re: [QUOTE=Nishinoran;672310]The google search you posted did not have anything related to programming. [/quote] It actually did answer the question [B]AD[/B] thought you asked. Which was more than I could do because to me your question doesn't make sense. What does the [icode]system()[/icode] command have to do with the size of … | |
Re: [QUOTE=Radical Edward;671785][QUOTE=MattEvans;671715]- How does endian-ness work? If two bytes A and B are written ( in that order ) into a file using put, then read on a machine with reversed endian-ness, do the bytes come out in a different order ( i.e. B, A ), or do they come … | |
Re: Since comments cannot be nested, a stack really is not necessary. A simple flag would suffice. Although a stack would be really helpful if you are looking for braces/parens/etc, things that [I]can[/I] be nested. | |
Re: [QUOTE=iamthwee;668029]What is the point of the end return? etc etc.[/QUOTE] To return from the function, probably. :icon_rolleyes: Just because [I]you[/I] don't want to be explicit doesn't mean others shouldn't be. And what [I]etc etc[/I]? I don't see that anywhere in the code. [B]xitrum69[/B], you should really have braces around your … | |
Re: Lives in Philippines -- "be more [I]pacific[/I]"! Ha Ha, that's funny!!!:) | |
Re: Such a mass of bad suggestions! [B]Arkm[/B]'s 1st post is a good suggestion for the read, but alas, the suggestion for using [url=http://www.gidnetwork.com/b-58.html]feof()[/url] is fraught with peril, and his [url=http://www.gidnetwork.com/b-38.html]formatting[/url] is atrocious (please click the links). And his second post is just wrong. [B]Salem[/B] then reiterates the easiest and most … | |
Re: IMAO, a restructure of the data file should be done. Don't rely on a number to tell you that you're done with the tracks. I know many songs that start with a number: [I]76 Trombones 8675309[/I] for example. Add to each line a type value that tells you what the … | |
Re: [QUOTE=gregorynoob;669912][QUOTE=williamhemsworth;669917]hmmmm but why would we expect anything else but integers between 1 and 100?[/QUOTE] Thats not really the point ^_^ But its always good practice to make sure that there are no warnings what so ever.[/QUOTE] [B]williamhemsworth[/B] is correct. And in addition, haven't you ever heard of [I]extra credit[/I], or … | |
Re: Compilers in no particular order [url=http://www.codeblocks.org/downloads.shtml]Code::Blocks[/url] [url=http://msdn.microsoft.com/vstudio/express/visualc/]MSVC++ Express[/url] [url=http://www.openwatcom.org/ftp/]Open Watcom C++/Fortran[/url] [url=http://www.bloodshed.net]Bloodshed DevC[/url] [url=http://cc.codegear.com/Free/turbocpp]Turbo C++ Explorer 2006[/url] [url=http://www.borland.com/downloads/download_cbuilder.html]Borland 5.5[/url] | |
Re: And few are willing to try to understand 167 lines of uncommented code not knowing what they are looking for. Try some explanation and detail so we don't have to waste our time. And if [B]iamthwee[/B] is right about point 1 (too bad he didn't link to proof)... | |
Re: [B]Jencas[/B] is correct. You might want to set a flag to stay in the loop (set to TRUE before entering the loop). Then in the loop set up a nested [I]IF[/I]: [code] IF the coordinates are good { IF the location is EMPTY { set the flag to FALSE so … | |
Re: 1) Copy the file 2) close the files 3) Open both files for read 4) read each file byte by byte and make sure both bytes are identical. If not, bad copy. 5) if you hit EOF at the same time, the files are identical 6) close the files 7) … | |
Re: WOW! 4 pieces of code to choose from! Which one works best? Which to choose to turn in as the assignment answer? C'mon guys, we're here to [I]help[/I], not do everyone's assignments for them! | |
Re: [QUOTE=Junyah;303219]But I found when I'm not looking .. I meet the nicest women.[/QUOTE] This is also what I've found... To paraphrase [B]pty[/B], look at it from a different perspective. You've had 23 girlfriends. That's more than most so you've got something good going for you. Are you still friendly with … | |
Re: Or you could just say [ICODE]system("notepad file.ext");[/ICODE] instead of passing arguments to a function that does nothing more than that anyway. Or if you want the command in a string, just use: [CODE=cpp] string command = "notepad file.ext "; ... system(command.c_str()); [/CODE] | |
Re: You don't need an array at all. Your idea [QUOTE=arun_lisieux;666239] 1) Get the no as input along with the no of digits 2) Separate the digits by collecting remainders of division by 10. 3) Use the digits, perform the function S(X). [/QUOTE] is close. All you need for #1 is … | |
Re: Did you miss reading all of the information posted all over this site about CODE tags, like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in the announcement at the top of this forum titled … | |
Re: A slightly more direct explanation: [code=Cpp] temp = word[i]; // Save the 1st letter word[i] = word[j]; // put the 2nd letter where the 1st was word[j] = temp; // put the 1st letter where the 2nd was [/code] And please learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. It's much easier for … | |
Re: First thing I noticed when you opened the save file was [CODE] ins.open(savefile, ios::in);[/CODE] What does [I]ios::in[/I] mean? [the question is a hint] | |
Re: Another lazy attempt at getting help -- with no Code Tags. Why didnt you read any of the requested information posted all over this site about CODE tags, like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this … | |
Re: And [url=http://www.gidnetwork.com/b-59.html]this series[/url] will explain why you should generally avoid [icode]scanf()[/icode] | |
Re: [url=http://www.gidnetwork.com/b-45.html]This might help[/url]... | |
Re: [QUOTE=Abakiz;663322]My problem is that ...[/QUOTE] ... you can't be bothered to read any of the requested information posted all over this site about CODE tags, like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in … | |
Re: [QUOTE=Aia;659121][QUOTE=DanDaMan;659112]Now I'm really confused. When I don't include system("PAUSE"); then the console screen just pops up and instantly disappears. [/QUOTE] [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385"]Look here[/URL][/QUOTE] Or, to keep it on site, [url=http://www.gidnetwork.com/b-61.html]look here[/url]. :icon_wink: | |
Re: Second problem is you are forgetting that the RETURN you type in is also a character that gets put into the buffer. Therefore, in this code: [code=cplusplus] cout << " Empezar?? " << "\n"; // TO START cout << " 1 - SI" << "\n"; cout << " 0 - … | |
Re: [QUOTE=Tilir;658760]Implicit type casts works (as usual in C) in strange inpredictable manner.[/QUOTE] Since [I]inpredictable[/I] is not a word, I assume you mean [I]unpredictable[/I]. The problem with this statement is that casts are [I]completely[/I] predictable. Can you give us an example that is strange and unpredictable? | |
Re: [QUOTE=bpacheco1227;659138]I think I fixed everything now the program end abruptly after the second menu. I've tried a number of things, couldn't get it , I'm not giving up just looking for a slap in the face and a pointer in the right direction. How do you guys stay sane with … | |
Re: sms 2 me tht u hv a prblm. snc we no u so well, we sgst cndl mkg. its mch ezr thn cptr | |
Re: "Is that you, Caroline?" her husband called from his study. | |
Re: [QUOTE=cmatos15;656365]So here's what I have so far, I know it's not correct but I think im on the right path, can someone let me know whats wrong...[/QUOTE] Actually, it's [B]your[/B] job to tell us what's wrong, not let us try to figure out what the program is doing and what … | |
Re: Where are you having the problem? What does the program do wrong? What makes it wrong? What should it do instead? When asking for help it's necessary to [I]explain[/I] the problem, not just toss 3 ambiguous sentences together without punctuation making it hard to decipher your meaning. | |
Re: [QUOTE=ArkM;655787]Don't waste the time, you live in C World now: [code=c] ++array[indexNum]; [/code][/QUOTE] I've always preferred the post-inc format [iCODE]array[indexNum]++;[/iCODE] for some reason. It's programmer's choice since they both ultimately do the same thing. And just for completeness, you can also do [iCODE]array[indexNum ] += 1;[/iCODE] Not extremely useful for … | |
Re: For starters, you typed right over the instructions on using code tags to make the code readable, and obviously didn't read the post titled "Read Me: Read This Before Posting"... The recursive function must: when called, 1) output a specified number of *s and SPACEs. 2) test if the value … | |
Re: Since we don't know what the desired output is nor what the program is supposed to do, what can we tell you? | |
Re: Argent's "Liar" done by Three Dog Night I've actually got a couple that go the other way. Springsteen's "Blinded By the Light" is rotten, but Manfred Mann made a great cover of it. | |
Re: [code] Open .txt file Start a loop: read each line into a string if the line starts with "id=" take the rest of the string and do what you need with it End loop [/code] | |
Re: You need two loops, not 1. For all digits before the decimal, you need to multiply the total by 10 then add the value. Byt the way use a [I]while[/I] loop. When you get to the decimal you need to start a new loop to deal with the characters after. | |
Re: Mainly Dew. Occasional Coke/Pepsi. Never coffee. I cant stand it. | |
Re: The program you're writing will work on [B][I]ANY[/I][/B] C compiler, even [I]piece of crap[/I] compilers, which Turbo C is not one of. It pisses me off every time someone denegrates good compilers just because they are older. If they do exactly what the user needs, it's fine. It just can't … | |
Re: [QUOTE=champnim;624325]I have a string of the form "abcd\"1234\"efgh". I want to extract 1234 from this string. How should I do this?[/QUOTE] That depends on if you need to 1) find [I]1234[/I] in the string and extract it 2) find the two "s and extract what's between them 3) extract the … | |
Re: It removes up to INT_MAX characters from the input buffer, basically clearing the buffer. | |
Re: [B]Jboy05[/B], it's rude to post continuously just to bump your thread. The people here have lives outside the forum and 9 of the 14 posts here are yours. Patience!!! Next, ignore everything [B]zhelih[/B] said. Stacks are not needed at all. Do you know how to use a [ICODE]while[/ICODE] loop? Do … | |
Re: It would be best to let us know what O/S and compiler you are using so we don't have to guess, as [B]jephthah[/B] was forced to do. They all have different ways to accomplish the task. | |
Re: [QUOTE=OboroNinja;45736]I wanna share with my friends but they dun have QBasic on thier comp. Ill put my programs on a floppy disc an give it to em but i cant figure out how to make them able to run without the actual QBasic program. It gets so frustrating! :evil:[/QUOTE] There … | |
Re: You also need to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] so we can read it. | |
Re: You cannot compare character strings in this manner. You need to use one of the string functions. You probably want [icode]if ( strcmp(argv[1], "e") == 0 )[/icode] | |
Re: It seems this question -- exactly -- has been posted already. | |
Re: [QUOTE=jbennet;611223]yeah, to be fair, zips have been common since windows 3.1[/QUOTE] Long before that, even. So what would you suggest, [B]Midi[/B] so 100% of the people can use the files? Instead of only 99%... :icon_rolleyes: |
The End.