5,676 Posted Topics
Re: You've been told twice that your [iCODE]digits()[/iCODE] needs a parameter. [B]jonsca[/B] even provided you with the format of a function. Now, go back to your book, look at the section on [I]functions[/I] and read it. Look at the examples. Then try to make [iCODE]digits()[/iCODE] look like those examples. If it … | |
Re: Please send me a copy of the book by the fastest route possible. Then I can look at the problem, laugh at how simple it is, then wonder if someone else helped you cheat while I waited. | |
Re: Just because [B]ravenous[/B] miscounted does not make his suggestion wrong. Do as recommended. | |
Re: If windows.h does not come with the compiler, downloading it won't help. You just can't use it. | |
Re: You need to stop thrashing about just trying things, and not understanding what you are using. Everything you need is in the [I]time.h[/I] header. Find an explanation of the functions and structures it contains (GOOGLE) and read it. Then you will be able to do this task with ease. It's … | |
Re: Use the character read from the file as an index into the array [B]The Dragon[/B] mentions, and increment that value. Then when done, look through that array using an index and if the element is > 0, output the index as a character. [B]The Dragon[/B] already gave you the code. | |
Re: Compilers [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] [url=http://www.cygwin.com/]cygwin[/url] Pick one. | |
Re: Keep a flag: [code] EnterKey = 0 if character = [ENTER_KEY} then EnterKey = EnterKey +1 [/code] You'll have to figure out what causes the flag [I]EnterKey[/I] to be reset to 0. | |
Re: How big is [B]throw[][/B] since [B]i[/B] has no value? | |
Re: You need to look at the format of your IF statements. They are malformed. | |
| |
Re: Open the .txt file for input Open the .html file for output Output the header Read the .txt file Write it to the output file Close both | |
Re: It's called a depth-first search since you know the maximum number of moves. Start with the unsolved starting point 3 5 2 8 7 1 4 6 9 Then generate the first possibilities with upper-left 1) 832 751 469 saving this solution Then rotate again, 2) 782 351 469 and … | |
| |
Re: [QUOTE=Akill10;]sorry, you maybe didn't see my edit, but would you be able to answer my other question? Thanks alot.[/QUOTE] That's why you souldn't edit posts except to correct mistakes... | |
Re: [QUOTE=exekiel101;]how can i make it correct???[/QUOTE] By formatting the code so we can read and follow it. By running it and seeing what it does wrong. By looking at what it does wrong and finding the problem area. By adding [ICODE]cout[/ICODE] statements to see what variables are wrong at a … | |
Re: First off, your formatting makes your code difficult to read. [url=http://www.gidnetwork.com/b-38.html]See this[/url] for assistance. [QUOTE=kyros;]hello everyone my aim is to count different words from text file and write them to output file with the number of occurences.but my code didn't work,I don't know the mistake but I think my read … | |
Re: [QUOTE=fab2;]I do apologise if I am not using the CODE and the ICODE correctly. [/QUOTE] This is a new one. Apologizing for not using something correctly that wasn't even attempted. [B]Use Advance Editor[/B] would have told you immediately. | |
Re: That's because it's [I]conio.h[/I]. But keep it commented out. You shouldn't be using it anyway -- it's not a standard header and if you get used to using it, when you change compilers you'll have problems because all your [I]conio.h[/I] functions will no longer exist and you'll have to weed … | |
Re: I have no idea what your first code is doing. The loop makes no sense, neither does the output. As for command line parameters, [url=http://www.gidnetwork.com/b-45.html]see this[/url] And for your first post: Code tags -- fantastic! Thank you! Code -- fair attempt at formatting the code. [url=http://www.gidnetwork.com/b-38.html]Check this out[/url] for more … | |
Re: Output the character before returning, see if it's being read properly. And [url=http://www.gidnetwork.com/b-60.html]see this[/url] about your [iCODE]scanf()[/iCODE] [QUOTE=l1ttledb;]edit: think its ok, how come i had to put [B]char[/B] graphic_choice( char x ),... [/QUOTE] Because you are defining the function as returning a character. [QUOTE=l1ttledb;]... i didn't have to put this … | |
Re: Are [QUOTE=Dizzzy;1123178]other webpages of huge sizes and txt file[s][/quote] binary files? I suspect not. [ICODE]strcat()[/ICODE] is only useful on text, not binary information. [B]nezachem[/B] is correct because an image is binary. You need a different way of processing non-text information. | |
Re: [QUOTE=TomaCukor;1428450]so now im trying to read integers from input untill input is eof or blank line(line was left empty and enter was hit) ... ive found some codes(getline ) but it only applies for char type ! and i dont want to go through the whole conversion thing(but if theres … | |
Re: [url=http://lmgtfy.com/?q=deep+web]Try This[/url] | |
Re: [QUOTE=HESSENY2000;1427713]Hi, many thanks My friend mrteey2k for your efforts and code after i install all components as your design and run but i found some error same that : if you calculate that 2/11/2010 9:00am till 3/11/2010 4:50pm = 950 minutes (correct answer ) PLZ Be NOTe if we Calc … | |
Re: If it's not part of your compiler, it won't work even if you do find it. Adding a header does no good without the associated code. | |
Re: [QUOTE=phobos666;1428405]If I give the array size as 60 and if there are only 35 rows then for the rest of the array size junk value gets printed. Is there a way to find the no of rows while the program is reading the file for the first time?[/QUOTE] Are you … | |
Re: I think it could remain a stickie. as for "confusing the newbies" I doubt it. They obviously just ignore them for the most part. Can't get confused when you don't bother to look... :icon_confused: | |
Re: All characters are also integer values. A=65, B=66, a=97, SPACE=32, etc. Do a search for ASCII CHART to see all the characters and their value. With that in mind, you can use the character (value) as an index into an array. Each character increments the array element associated with it. … | |
| |
Re: [QUOTE=jackmaverick1;]what's in the header file that's called "conio.h"? [QUOTE=Dingbats;] for the int getch(void); (amongst others) [/QUOTE] [/QUOTE] The real question is why is the O/P using a non-standard C function from [I]conio.h[/I] in a C++ program when a simple [I]cin.get()[/I] will suffice? | |
Re: Start at the beginning of the string and look at each character. Every time you find a ( remember it's position in the string. When you find a ), evaluate the equation from the last ( to the just found ) Remove that equation replacing it with the answer just … | |
Re: Why did you start a new thread on the same topic? Please continue with the original thread. | |
Re: [QUOTE=salvador01;]hi! iam a newbie how can i get the 10th, 100th, 1000th place for example: the interger is 1235, the ones place is 5, the tenth place is 3, the hundreds place is 2, and the thousands place is 1, please help me[/QUOTE] Of course you're a [I]newbie[/I]. Only newbies … | |
Re: Try [url=http://lmgtfy.com?q=c%2B%2B+gui+programming]this[/url] | |
Re: So rather than trying to figure it out, you simply ask us to tell you? Maybe the task is to actually figure out how to find the answer. | |
Re: That depends on the compiler you are using. Would I be correct in assuming it's an old Borland compiler? 3.0 perhaps? | |
Re: [QUOTE=arkoenig;1424798]This is not quite right: You need to restrict the swapping so that the destination position is always >= the source position. [code] int rowToSwap = a random valid row that is >= row int colToSwap = rowToSwap == row? a random valid row that is >= col : a … | |
Re: I'm sure the meaning can be found 1) in your book if you have one 2) in the tutorial you are using, if you are using one 3) from GOOGLE, which knows everything and can explain stuff better than we can. | |
Re: I've never had a problem with double posting as long as new useful information is posted, or quoted responses to multiple posts are being done. It's bumping that irritates me. I do miss the multiple-reply button. Many times I want to reply to more than one post in a thread … | |
Re: OK, done. Took 5 minutes, 37 seconds (I type slow). Now what? | |
Re: [QUOTE=phobos666;]Hi, I need to open a file containing string values one below the other and display them. I'm able to open the file but there is some error while displaying them. Below is my code, kindly guide me to my mistake.[/QUOTE] Then you made [I]some error[/I] programming the code. Your … | |
Re: You didn't specify -M or -MM on the command line would be my guess. | |
Re: [B]xiilin[/B] seems to be the only intelligent person posting in this thread! Use [iCODE]scanf()[/iCODE] as suggested. | |
Re: [QUOTE=AmerJamil;1423077]Narue@ code is horrible lol. i knw u ll say to use <iostream> instead of iostream.h and conio.h is non standard header file..etc lol i knw everything but im using TURBO C++ version 3.0 it require these things[/QUOTE] [I]conio.h[/I] is not and [B]never has been[/B] required. If you know everything, … | |
Re: Does [B]s[/B] contain the file name you want to open? If so, use it in your [iCODE]fopen()[/iCODE] statement. | |
Re: [CODE]static int is_valid_dice_selection (char input []) { char input[i]; int length; length = strlen(input); for (i = 0; i < strlen(input)-1; i++) { } return 0; } [/code] This function is not needed if you're going to do all the checking in [ICODE]select_dice()[/ICODE]. [CODE] static void select_dice (int reroll_flags []) … | |
Re: [QUOTE=Ali Shah Ahmed;1128122]How can i print 123454321 (on input 5) in a single loop without any conditional statement...???[/QUOTE] Is this a joke? |
The End.