5,676 Posted Topics
Re: [QUOTE=pseudorandom21;1594400]Lol I hate to say it but Dev-C++ is a poor choice also, it's buggy and no longer supported as far as I know.[/QUOTE] [url=http://www.daniweb.com/software-development/cpp/threads/370755/1594420#post1594420]Really? How So?[/url] | |
Re: You are doing the right thing already. Anything else is just more complicated, time consuming, and obfuscated. Just because you [I]read[/I] a line, doesn't mean you have to [I]scan[/I] the characters. | |
Re: [QUOTE=Lost in Code...;457283]Greetings, I'm having a problem with this code below. [/QUOTE] So am I. See the [url=http://www.gidnetwork.com/b-59.html][INLINECODE]scanf()[/INLINECODE] series here[/url]... [QUOTE=Lost in Code...;457287]try using %s in the scanf's[/QUOTE] No, better not. [url=http://www.gidnetwork.com/b-62.html]Here's why[/url]. [QUOTE=Ptolemy;457303]>try using %s in the scanf's No, don't. At least don't until you know how to safely … | |
Re: [QUOTE=warrior4321;1590811]I'm wondering how to remove the stuff at the end of the console, where it says the execution time, press any key to continue, and what the process returned. I am using Codeblocks.[/QUOTE] Run the program directly from the console. It's CodeBlocks itself that's outputting that stuff. | |
Re: You didn't call the function in the DLL correctly would be my guess. | |
Re: Here's a better loop to fully understand exactly what keys do what: [CODE] while (ch != 0x1B) // exit on ESC { ch = getch(); printf("%02X ", ch); } [/CODE] Watch the output carefully to see what keys use 2 chars. | |
Re: cant tell your code doesnt seem to read the file properly maybe you should print the data to the screen after reading it that way you can actually follow what the code is reading it also helps to use punctuation so we dont have to struggle to understand your question … | |
Re: [QUOTE=sharma89bunty;1586583]sir i have a problem in the c program. [CODE]switch(ch) { case 1: t=a+b;break; case 2: t=a-b;break; case 3: t=a*b;break; case 4: t=a/b;break; default:printf("invalid no:"); }[/CODE] when i execute the program and the any choice the comipler skip to the default statement. is it any problem in the syntax. sir … | |
Re: The way you wrote the code, it always returns to the menu. Remove the loop and it won't return to the menu. | |
Re: Actually, I more agree with John than Lisa. Not completely, of course. IMO, email [i]as currently designed[/i] needs to be shot (read [b]redesigned[/b]). Looking at his points: [b]1. The ever-changing address.[/b] For professional email addresses, his complaint is stupid. I understand where he's coming from, but the problem people here … ![]() | |
Re: [QUOTE=murnesty;]if you are using windows then can you use [CODE]system("exit");[/CODE]. The content inside the bracket of system() is your command prompt instruction.[/QUOTE] That's absolutely terrible. What does [iCODE]system("exit");[/iCODE] do better than [ICODE]return 0;[/ICODE]. Give you one guess what it does worse... | |
Re: Doesn't anyone know how to write a simple test to figure out something that they don't quite understand? [CODE] #include <iostream> using namespace std; int main(int ac, char *av[]) { int i; cout << "Arg count = " << ac << endl; for (i=0; i<ac; i++) { cout << "param … | |
Re: and if you don't need the command line parameters for your program, explain again how it's better and should [I]always[/I] be used?. | |
Re: I think it's criminal to charge for luggage at all. | |
Re: This is the [I]old-style[/I] format for function. I used to use them in the early 80's until if found out the style changed. 1) The rules to this style is basically don't use it. 2) Disadvantages -- it will confuse people (look in a mirror :icon_wink:) 2A) Just different 2B) … | |
Re: [QUOTE=pseudorandom21;1586210]Mostly people would say it's bad practice to use exceptions like you are, but for such a simple program it won't matter.[/QUOTE] FYI, most people would have no idea what you mean because if they use it wrong they obviously don't know any better. Without explanation you are just adding … | |
Re: Why would you want to use bit manipulation to do the arithmetic? And how would you use bit manipulation on floats or doubles? Just using + - * / is as easy as it gets. As for accuracy, what is the value of [I]1 divided by 3[/I]? And what is … | |
Re: [QUOTE=merse;]How to determine the encoding of a text file?[/quote] Text files are not encoded. They are text. [QUOTE=merse;]And are there any tools to handle the content of a text file independent of its encoding?[/QUOTE] Standard I/O commands. | |
Re: I don't understand. You state: [QUOTE=ilovec++;]c)In your program, you have used the [ICODE]system("pause")[/ICODE] function. It is recommended not to use this function as this sends a system call to the DOS shell, and tells it to execute the pause function, thus causing a delay in program(although in milliseconds), and using … | |
Re: I got lots of references on google using [I]dos.h int86[/I]. | |
Re: [QUOTE=dina154;1582577]still missing a feww coding here......[/QUOTE] So add the coding. Since we didn't assign the task and you didn't bother asking a question, we don't know what you need, so we have nothing to say. | |
Re: I've only read the first few pages of this thread. Outside of the Bible-bashing and God-bashing statements that make worthless claims rather than debatable points, there are some good points, and flat out wrong information. Disclaimer: [I]Many of my points have not been fully researched by me as I am … ![]() | |
Re: The 5th line of your convert function you are testing for lower case when you should be testing for upper case. You're welcome. The Psychic Programmer. | |
Re: You want to [I]floor[/I] [B]then[/B] /1000.0 You are dividing by 1000 then taking the [I]floor[/I]. | |
Re: [url=http://www.gidnetwork.com/b-58.html]read this[/url] Why are you opening the file as binary if you are using [iCODE]fprintf()[/iCODE]? After you finish writing your first file, you start reading from it. What's there to read when you are at the end of the file? | |
Re: Copy the characters from the old string into a new string with the appropriate separator at the appropriate time. | |
Re: As I pointed out before, since you are not an Admin, let the Admin deal with these matters. They are going to anyway, so you don't need to post at all. | |
Re: Start at both ends using 2 index values If a character is to be ignored, just inc/decrement the index and restart the loop. | |
Re: [QUOTE=whitelite;]i want to make rot13 encryption this program convert ascii code from a caracter, and work only with uppercase character (65-90)[/quote] Think it might have something to do with [iCODE]if ((int)input[i] < 65 || (int)input[i] > 90)[/iCODE] :icon_question: | |
Re: [QUOTE=yah2009;1579869][B]hi help me in resolving these questions[/QUOTE] Sure. Open your book. Read each chapter. Look at question #1. Look up how to do a factorial. Write the code. Look at question 2. Figure out an exchange rate. Use that rate in a program to convert currency. Continue.... | |
Re: [QUOTE=arkoenig;1578698]What you've written is really a C program. I suggest that you either rewrite it in C++ or ask your question in the C forum. [/QUOTE] Since he's [I]new[/I] to C++, I'm sure his instructor has been teaching the rudiments of C++ (which is C in his mind) and not … | |
Re: Maybe reading the information on the site that created the library might help. | |
Re: [QUOTE=infiniteloop56;]CANNOT USE THE POW() FUNCTION. [/quote] Why are you shouting at us? Do you really think we can't understand you unless you shout? [QUOTE=infiniteloop56;]ANY HELP APPRECIATED![/QUOTE] What again? Why would you need to yell at us again!?!!? [QUOTE=The Member Rules]Do not write in [B]all uppercase[/B] or use "leet", "txt" or … | |
Re: Multiple things: [ICODE] srand((unsigned)time(NULL));[/ICODE] should be at the beginning of the program, in [I]main()[/I] Desk-check your program to see what value [ICODE](aux<=100-complexity)[/ICODE] is going to be at various times through the loops. [CODE] int lowest=0, highest=100; int range=(highest-lowest)+1; aux=lowest+int(range*rand()/(RAND_MAX + 1.0));[/CODE] Why this convoluted equation when all you want is … | |
Re: Your IF statement is [I]always[/I] true. Write a truth table and see why. | |
Re: [QUOTE=Portgas D. Ace;]It's because your Illiterate and make silly comments anyway Wenbnet.[/QUOTE] Who's illiterate? Literate people know the difference between [B]your[/B] and [B]you're[/B]. | |
Re: [QUOTE=jonsca;]Is there really any other kind? ;)[/QUOTE] Yeah, LISP. It'th all parenthetheth. No bracket'th at all. :icon_twisted: ![]() | |
Re: Does a cell have a LostFocus event? If so, replicate hitting ENTER there. This should run as the SUBMIT button is clicked. | |
Re: [QUOTE=leetari;]hi all, I have this minor problem which is making me go cranky at the mo.. [/quote] Do other problems make you a little Larry, and others Curly? :icon_rolleyes: [QUOTE=leetari;] Below is the code which I am working on which takes the test sample values stored in my test 2D … | |
Re: I get the link displayed in the status bar. No problem here on FireFox. | |
Re: Use the second one. The first one is crap. | |
Re: [QUOTE=Mike_11;]Well I assumed X (being a 'char') is any letter.[/quote] No, it's any value 0 to 255. But which one? If you don't set it, you have no idea. [QUOTE=Mike_11;]Ok, so the solution to this would be... [CODE]} while (isalpha(integervalue));[/CODE] Right? Am I making any sense? :P[/QUOTE] That looks like … | |
Re: [QUOTE=SgtMe;1416768]Wow! That's a lot of code![/QUOTE] I agree. Over 1000 lines of code with no indication of where the problem could be. That's why I for one ignored the question. I already have a full time job and don't need another one being a code maintenance technician -- unpaid no … | |
Re: [url=http://www.any-video-converter.com/products/for_video_free/]here[/url] | |
Re: [iCODE]for (a = 0; a <= ID[50]; a++)[/iCODE] There is no ID[50]. ID[] goes from 0-49 (50 entries). And you have no data in ID[50] to begin with for the comparison. You want to: [code] Open the file Set [B]a[/B] to 0 Start a [B]while[/B] loop (you don't really know … | |
Re: What did the open file return? My guess is the program is running in the compiler directory, not the source directory. Open and write "text.txt" and find out where the file was created. | |
Re: Programming language: I've used assembler, Fortran, Basic, and C. Choose a language you know and can connect to the software driver you need to interface with the hardware. Operating system: Anything the software driver will work on. Hardware: Usually you need a computer interface that converts the computer signal onto … |
The End.