5,676 Posted Topics
Re: You've been around over a year and haven't read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] yet? You also need to [url=http://www.daniweb.com/techtalkforums/thread78223.html]read this[/url]. It will explain that you need to tell us what problem you are having so we don't have to guess -- among other things | |
Re: 1) Not going to even look at code that is that poorly formatted. Learn to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] if you want help. 2) Why do you assume we have time to test your program? If you ran it with a good set of data and it didn't have a problem, … | |
Re: [QUOTE=Mr. K;]I don`t use allegro timers because I don“t know how to use them. Can you teach me how to use them?[/QUOTE] Oh, absolutely! [url=http://lmgtfy.com/?q=allegro+timers+tutorial]Here you go[/url]. Anything else? We're here to serve. | |
Re: Convert your PHP code into C++ code. Compile the program. No need for anything but the database and C++ program then. | |
Re: My most recurring problem is clicking on the UP/DOWN arrows and have nothing happen. Finally after multiple clicks, the box usually opens. But not always. | |
Re: Of course there is. [iCODE]cin[/iCODE] will accept all data types in one statement. Maybe you need to explain in detail what you are trying to accomplish in the end. Based on your question as posted, it's a trivial procedure. Just look at one character at a time and combine them … | |
Re: Never [B]Never[/B] load a value into [iCODE]argv[][/iCODE] variables! Never! You will probably crash the program by overwriting memory you don't want written. And if it doesn't crash, you have no idea what will happen to your program. Like maybe a file not found. | |
Re: [CODE]Read a string fgets() set flag to TRUE For i=0 to string length if string(i) != digit nor dot set flag to FALSE end for if flag = FALSE number was not entered[/CODE] | |
Re: I hope Quantas is still around. I need to make a phone call... | |
Re: [QUOTE=GunZaman;] hope i wasnt to late thought :P[/QUOTE] Only by [B]SIX[/B] years... :icon_rolleyes: | |
Re: Meaning what? You want to 1) write a program that accepts voice commands and executes stuff? 2) write c programs by voice using a voice program that already exists? And please don't command us to "please reply" -- we will reply if we have something to say without being ordered... | |
| |
Re: Who cares? If you really want your -40 back I'm sure we can down vote all your posts in this thread to get you back there if you really want us to.... :icon_rolleyes: | |
Re: [QUOTE=~s.o.s~;1568159]AFAIK, there is no way of doing this. You can of course use a pen and paper (or a text file in computer savvy terms) to keep track of things but I'm sure you didn't have this in mind when you asked the question. ;-)[/QUOTE] Pen and paper? Text file? … | |
| |
Re: I prefer something along the lines of [CODE] char s[] = "here Is A String With White \n Space"; int i1, i2; ... i2=0; for (i1=0; i1 < strlen(s); i1++) { if (!isspace(s[i1]) s[i2++] = s[i1]; } [/CODE] Another version: [CODE] string s = "here Is A String With White … | |
Re: [QUOTE=Portgas D. Ace;]I'm back too... just saying.. XD[/QUOTE] HIDE!!! :icon_twisted: | |
Re: [url=http://lmgtfy.com/?q=libcurl]Allow me[/url] :icon_rolleyes: Maybe you can learn something from this post... | |
Re: [QUOTE=Nick Evan;]*mumbles something about bugtracking systems..[/QUOTE] Bugtracking is only as good as the users using it.... :icon_wink: | |
Re: [url=http://www.gidnetwork.com/b-56.html]Here's one explanation[/url] why you never use [iCODE]gets()[/iCODE]. And [url=http://www.gidnetwork.com/b-62.html]see this one[/url] about [iCODE]scanf()[/iCODE] | |
![]() | |
Re: 1) Make sure the file is in sorted order 2) Read the file into an array of [iCODE]strings[/iCODE] (not a 2D-char array as suggested) 3) Use a Binary Search (google it) to find whatever the user enters. ![]() | |
Re: I'd like to be able to read your code. Please post a clean version of it. Here are some [url=http://www.gidnetwork.com/b-38.html]guidelines[/url] to help. In general:[INDENT]read a line check if one of your keywords is present if so, parse the data out go back to read another line[/INDENT] | |
Re: [QUOTE=TheWolverine;] This leads me to thinking that maybe I can't just replace the "\r" and "\n" characters, but everything I read suggests that it's the combination of the two that Windows uses to represent EOL characters.[/QUOTE] Correct... Windows uses <CR><LF> combination Mac uses <CR> alone *nix uses <LF> alone | |
Re: [QUOTE=rpstata;]Dear All, Kindly go through the following program. [/QUOTE] Dear rpstata, Kindly remove all extraneous blank lines (and comments) and [url=http://www.gidnetwork.com/b-38.html]indent your code[/url] properly so we can follow it. Then we can understand the program flow and it will fit on our screen and help mucho bueno. | |
Re: You don't. If you've never used it, why must it be deleted? Just let it stagnate. | |
Re: Reread how [iCODE]strcpy()[/iCODE] statement is formed. Also, [url=http://www.gidnetwork.com/b-57.html]see this[/url]. | |
Re: [QUOTE=jon.kiparsky;] But if there is some interest, and if the interested parties are willing and able to ensure that incoming questions would be addressed with reasonable promptitude, I don't see the harm in giving it a try - let it run for a year and see whether it gets traffic. … | |
Re: [QUOTE=jayrpalanas;1563956]anybody can give me the free link for c/c++ software?...please give me... thank you!!![/QUOTE] [url=http://lmgtfy.com/?q=C%2B%2B+compilers]Try This[/url] ![]() | |
Re: [QUOTE=DerrickC;]I have written the following program. It collects inventory information and stores it in a file. I need to write a separate program that will access that file and give me the totals of the information stored in it ie. (quantity,wholesalecost,retailcost). What I'm specifically having trouble with is how to … | |
Re: Set up a flag (OuputBlank) initialized to TRUE. When you output a blank line, set flag to FALSE. Next time you need to output a blank line, test the flag first. When you output a non-blank line, set the flag to TRUE. | |
| |
Re: [QUOTE=abhimanipal;]You do not need to use the stl library to calculate the min / max . Try writing the code on your own .. Let me give you a head start For Min. 1. Create a temp variable and give it a value of 30,000 [or any such large value].[/quote] … | |
Re: Output a prompt asking for filename Input as string Use the string in [iCODE]FindFirstFile()[/iCODE] as per the definition of the function. | |
Re: Yes. And no. It depends. All you really need to understand is [iCODE]int delay;[/iCODE] creates a variable with an unknown value. Don't use it without setting a value. [iCODE]int delay = 5;[/iCODE] creates a variable with a known value. [iCODE]delay = 5;[/iCODE] sets an already created variable with a known … | |
Re: Because the dates are stored as character arrays, not strings. A string ends in with '\0'. You have space for the date only: [B]01/01/2012[/B] = 10 characters. Define your dates as 11 or more characters make sure you load a '\0' in the 11th position. Also, [url=http://www.gidnetwork.com/b-56.html]see this about using … | |
| |
Re: [QUOTE=vidit_X;1559791]Someone please give a look to this problem.. [url]http://www.codechef.com/problems/PALIN/[/url] I tried submitting the above solution but its giving a runtime error.[/QUOTE] 104 posts and that's the information you give to a problem -- "[I]gives a run-time error[/I]"? :icon_rolleyes: My car makes a squirsh noise. Please tell me how to fix … | |
Re: Because you are using [iCODE].eof[/iCODE] to control your loop. [url=http://www.gidnetwork.com/b-58.html]See this[/url]. [iCODE]feof()[/iCODE] is exactly the same. | |
Re: Do you know how to do it if you defined the array as [iCODE]int Loc[100][/iCODE]? It's the same... | |
Re: #1) You use a single IF to test if the first letter returns from your function good or bad. After that first test you never test the return from the function. #2) Your instructions do not mention exiting on 'a'. I'm certain you should exit on an 'error' return from … | |
Re: What does your error checking tell you of the open and write? | |
Re: Actually, you don't need the && at all. And you can shorten your code dramatically by looking more carefully at it: [CODE] if (weight <= 18.4) { cout << "Your BMI is " << weight << " you are underweight." << endl; } else if (weight <= 24.9) // weight … | |
Re: You keep changing what you ask for. Now answering: [QUOTE=fadi_1234;1555386] let say that: num=num2/3 num1=num3/5 how to make random between num and num1[/QUOTE] Assuming num < num1: [ICODE]random-number = (rand() % (num1 - num)) + num[/ICODE] |
The End.