5,676 Posted Topics
Re: [QUOTE=mybluehair;1127321]Thanks. also, is there a better way to print out stuff to allegro besides using textout_ex? It seems like textout_ex is going to thoroughly p*ss me off seeing as how specific if you have be to make it work.[/QUOTE] Wrong attitude. It's specific because it needs to be. Once you … | |
Re: [QUOTE=truthuntold;1127429]I am running into problem on getting this program done. Its suppose to quiz you on your 2 powers ie(2^2 = 4, 2^22 = 2m, 2^46 = 32t) I've programmed in python for a couple years but a lot of the tricks python lets us have C++ doesn't or I … | |
Re: [QUOTE=dusktreader;1127284]First, think about how you would normally create and put numbers into an array. How will you know how big to make the array so that it can hold all the numbers you read in? You should probably dynamically allocate the array with the [B]new[/B] operation. blah blah blah.[/QUOTE] In … | |
Re: I take it you didn't understand what was mentioned in "[B]Member Rules[/B]" and the sticky post above "[B]Read Me: Read This Before Posting[/B]" | |
Re: [url=http://www.gidnetwork.com/b-66.html]This is why.[/url] | |
Re: [QUOTE=totalwar235;1118244]i am having a few errors compiling a code in visual C++ with my jumble word code, can anyone help? [/QUOTE] Yes we can, if you give us an idea what's wrong. We can't see your screen with the errors. | |
Re: Not bad for a first day. One thing you need to learn right away is [url=http://www.gidnetwork.com/b-38.html]this[/url], though. | |
Re: [iCODE]strcpy(choice, "yes");[/iCODE] Anywhere you need it initialized. :icon_rolleyes: | |
Re: Oh, c'mon, [B]jonsca[/B] [QUOTE=jonsca;1124220]You will need to either tokenize the lines and get rid of anything after // or between /* */ -or- You can write a finite state machine similar to the ones that a compiler would use... -or- You can use a regex library...[/QUOTE] He said [QUOTE=iamfabian;1124029][B]Totally new … | |
Re: [QUOTE=Agni;1124921]OK.. I guess it is the difference of newline characters in windows and unix. I tried on Unix and it worked, forgetting that it may not work in the same way for windows. Probably you can try this [code=c++] cin.ignore ( 80, '\n' ); //reads and discards 80 character or … | |
Re: [QUOTE=jonsca;1126493]It's best [URL="http://www.daniweb.com/forums/post155265-18.html"]not to use EOF[/URL]. [/QUOTE] EOF is fine. It's best not to us [ICODE].eof()[/ICODE] -- a big difference. :icon_wink: | |
Re: So what's wrong? And don't say "it doesn't work" we know that. | |
Re: [QUOTE=kevin04;1126210]give me a code to calculate the sum,highest,lowest and average?[/QUOTE] Pretty demanding for a first time poster who can't be bothered to read the Member Rules or any other posting instructions on this site. | |
Re: [QUOTE=xavier666;1094093]Where is this thread heading to?[/QUOTE] Into the Closed Thread heap for too many useless bumps. | |
Re: You are attempting to [ICODE]strcat()[/ICODE] to a variable that cannot be added to. What address have you loaded into [ICODE]dir_nm[/ICODE]? That address space is not completely under your control (for example, how large is the space, enough to add characters to?) so you should not be changing it. You need … | |
Re: Better. But not quite. Put the tags around the CODE only. Not the entire message. At least a step in the right direction. Now you need to format your code. Indenting is required for people to follow it. | |
Re: That's is not as easy as it sounds... You need to - input the number as a string - test the string making sure only digits were entered - if not, output error - if so, convert the string into your number. I'd wait on this until you learn just … | |
Re: From no Code tags to Code tags every 3 lines. :icon_rolleyes: C'mon, put CODE tags around your code. Don't add them just to add them. Don't add them around questions. Only the code -- all of it. Once -- unless you have two distinct pieces of code (two files, two … | |
Re: [QUOTE=srrid.ajmal;1124469]Try to use fflush(stdin) before reading. It will flush the standard input(keyboard)[/QUOTE] Never, NEVER, [B]NEVER[/B] use [ICODE]fflush(stdin)[/ICODE]. [url=http://www.gidnetwork.com/b-57.html]Here's why[/url]. | |
Re: Sure. Stop hijacking old threads. Read the Forum Rule. Check out the Sticky Posts before posting again. | |
Re: Add a portion of your code in your post -- the part that's giving you trouble -- with CODE Tags (don't ask, they're explained everywhere). And a complete explanation of the problem code helps. | |
Re: [QUOTE=Kombat;1122359]does this make sense[/QUOTE] No. What happens when you enter [CODE]123 -----[/CODE] [CODE] 123 -----[/CODE] | |
Re: [QUOTE=ppotter3;1124703]I have one error now..... What does this mean? : error C2064: term does not evaluate to a function taking 3 arguments [/QUOTE] Something in your code is specified as a function with 3 arguments, but isn't a function with 3 arguments. | |
Re: Does your system/compiler actually handle 64 bit values? The 'easiest' way to handle this is to create a union using your double and a byte array. Then output the binary from the bytes. | |
Re: I'll give you the benefit of time this time. You received an infraction warning about CODE tags 7 minutes before posting this. Last warning. | |
Re: Esto es un sitio de habla inglesa Cerrado. No fije la misma pregunta en foros múltiples. | |
Re: Closed. Do not post the same question in multiple forums. | |
Re: When talking about integers, they are all stored in [I]binary[/I]. You can display them in decimal, hex, octal, sixbit, etc. but they are all in binary. To see the value in hex, all you need to do is output with the proper format specifier: %X-hex, %d-decimal, etc. | |
Re: In order for the functions in the header file to work, you need the [I]code[/I] that is actually behind the function. That code is found in a library file. Look at it this way: The header file is like the phone book. It gives you the people and address of … | |
Re: Good. Cuz the answer would've been "[I]Because you wrote it wrong[/I]" Without details, and our lack of psychic ability, what else could we say? | |
Re: In layman's terms: What precision do you need? If 3 decimals, an EPSILON of .000x or smaller would work. [B]invisi[/B], it is not recommended to compare doubles for equality. The value 25 could be 25.0000001 or 24.9999999. Both are essentially equal, but floating point values are rarely exact. | |
Re: [QUOTE=anthony5557;1124595]Ok, I've figured out how to display the file that the user asks for. But when they enter the wrong file it tells them that there was an error opening the file that they choose. Does anyone know how to make it keep looping the question until they enter the … | |
Re: If you type in 0 and 0, what are the value of a&b at the end of the while loop? That should help you figure out the two numbers to enter. | |
Re: [QUOTE=jwenting;1114083]Probably an error in translation :)[/QUOTE] Nope. Translation is fine. It [B]is[/B] gauche. And it's uber-gauche to use [ICODE]goto[/ICODE] :icon_wink: | |
Re: [QUOTE=khaled.s;1123955]What if i need them to be in the same program, what should i do?[/QUOTE] Figure out what you're trying to accomplish and think carefully about how you can put the code together into one file. It [I]may[/I] mean a [ICODE]if()[/ICODE] statement or two, and another question to the user. | |
Re: [QUOTE=Lerner;1123819]in C/C++ the square root of a number can be calculated using the pow() using 0.5 as the second parameter.[/QUOTE] Isn't [ICODE]sqrt()[/ICODE] available? | |
Re: [QUOTE=apegram;1108445]My password is always the day of the week my password was created. I tell people that, too, because it's not like they'll know what day of the week I created it. That makes it secure. Extremely secure.[/QUOTE] Really? Give me 7 guesses... :icon_rolleyes: | |
Re: Open another file. If the line is not the one you want, output it. The new file is your result. | |
Re: I'd recommend going to a shop that custom builds computers and you can explain what you want and they can match the computer components to you needs. They will also give you good service (generally) -- at least much more than Dell, Gateway, etc. | |
Re: [QUOTE=Jeronim;1122882]s/he is using printf with using namespace std it just proves that s/he is beginner in these and s/he need to learn how to think in c/c++ to be able to solve task like these one and s/he wont learn that by reading some text but looking in code.[/QUOTE] [B]Jonsca[/B] … | |
| |
Re: Your class [B]Gradebook[/B] has a private value named [I]courseName[/I]. The only way to put a value in it is to call [iCODE]setCourseName( name )[/iCODE] to load the value [I]name[/I] into it. And since it's a private value you must call [iCODE]getCourseName()[/iCODE] to retrieve it. | |
Re: [QUOTE=sidra 100;1122965]plz guide me i m having some error at line 28[/QUOTE] After 48 posts you can't give us a better explanation than "[i]some error[/i]." Since you think we're as psychic as you, read my mind for your error. :icon_rolleyes: | |
Re: [QUOTE=kymarscheng;1120927]How to store the data of a program without using registry? Because I don't want the users change the registry and the program settings... Are there any other ways that can prevent the users from changing the settings?[/QUOTE] Don't open the registry? What makes you think you need to store … | |
Re: Yes. That's one of the main reasons for having pointers. | |
Re: So start a new thread and ask a proper question. Check out [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] | |
Re: [QUOTE=esesili;1122371]Hi All, When I try to compile the code below, I get error message " error: ‘MAX_IMG_HEIGHT’ undeclared here (not in a function)". [/QUOTE] Where is [ICODE]MAX_IMG_HEIGHT[/ICODE] defined? What's its value? | |
Re: Where do you calculate [I]both[/I] roots? I only see one calculated. |
The End.