5,676 Posted Topics

Member Avatar for Dingbats

[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]

Member Avatar for Dingbats
0
1K
Member Avatar for tubby123

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.

Member Avatar for Adak
0
95
Member Avatar for Lost in Code...

[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 …

Member Avatar for bajishareef
0
6K
Member Avatar for warrior4321

[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.

Member Avatar for WaltP
0
123
Member Avatar for mchin131
Member Avatar for kumarmpk4u
Member Avatar for kumarmpk4u
0
99
Member Avatar for asrockw7

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.

Member Avatar for vegaseat
0
7K
Member Avatar for ryamjones

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 …

Member Avatar for raptr_dflo
0
156
Member Avatar for sharma89bunty

[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 …

Member Avatar for venkata suresh
0
204
Member Avatar for thecoolman5

The way you wrote the code, it always returns to the menu. Remove the loop and it won't return to the menu.

Member Avatar for raptr_dflo
0
2K
Member Avatar for Lisa Hoover

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 …

Member Avatar for diafol
0
385
Member Avatar for emmaand

[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...

Member Avatar for murnesty
0
8K
Member Avatar for Celtrix

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 …

Member Avatar for Celtrix
0
174
Member Avatar for MareoRaft

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?.

Member Avatar for Raphaelnad
0
458
Member Avatar for Ancient Dragon
Member Avatar for N1GHTS

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) …

Member Avatar for N1GHTS
0
205
Member Avatar for king03

[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 …

Member Avatar for WaltP
0
119
Member Avatar for pardhu463

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 …

Member Avatar for N1GHTS
0
196
Member Avatar for merse

[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.

Member Avatar for Ancient Dragon
0
120
Member Avatar for Lilcrew

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 …

Member Avatar for NathanOliver
0
303
Member Avatar for amirwan
Member Avatar for sami qaz
0
537
Member Avatar for dina154

[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.

Member Avatar for dina154
0
2K
Member Avatar for mrnutty

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 …

Member Avatar for iamthwee
2
1K
Member Avatar for glucose

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.

Member Avatar for WaltP
0
112
Member Avatar for akhal

You want to [I]floor[/I] [B]then[/B] /1000.0 You are dividing by 1000 then taking the [I]floor[/I].

Member Avatar for WaltP
0
56
Member Avatar for super.mina
Member Avatar for bufospro

[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?

Member Avatar for WaltP
0
86
Member Avatar for shadowscape

Copy the characters from the old string into a new string with the appropriate separator at the appropriate time.

Member Avatar for mike_2000_17
0
224
Member Avatar for microlatina

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.

Member Avatar for microlatina
0
120
Member Avatar for henrimontreal

Start at both ends using 2 index values If a character is to be ignored, just inc/decrement the index and restart the loop.

Member Avatar for vijayan121
0
126
Member Avatar for whitelite

[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:

Member Avatar for andrewll2
0
244
Member Avatar for yah2009

[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....

Member Avatar for Nick Evan
-2
148
Member Avatar for merse
Member Avatar for dgreene1210

[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 …

Member Avatar for MareoRaft
0
974
Member Avatar for yobbko

Maybe reading the information on the site that created the library might help.

Member Avatar for raptr_dflo
0
948
Member Avatar for infiniteloop56

[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 …

Member Avatar for raptr_dflo
0
232
Member Avatar for Ninjah

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 …

Member Avatar for Ninjah
0
211
Member Avatar for beatbox32
Member Avatar for beatbox32
0
479
Member Avatar for Abel123

[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].

Member Avatar for jingda
0
709
Member Avatar for pseudorandom21

[QUOTE=jonsca;]Is there really any other kind? ;)[/QUOTE] Yeah, LISP. It'th all parenthetheth. No bracket'th at all. :icon_twisted:

Member Avatar for diafol
0
225
Member Avatar for Swoop_GB

Does a cell have a LostFocus event? If so, replicate hitting ENTER there. This should run as the SUBMIT button is clicked.

Member Avatar for Swoop_GB
0
507
Member Avatar for leetari

[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 …

Member Avatar for leetari
0
161
Member Avatar for Ancient Dragon
Member Avatar for pseudorandom21
0
128
Member Avatar for Saith
Member Avatar for Mike_11

[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 …

Member Avatar for AKMafia001
0
407
Member Avatar for maikens

[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 …

Member Avatar for daianahoney
0
319
Member Avatar for sovannak

[url=http://www.any-video-converter.com/products/for_video_free/]here[/url]

Member Avatar for WaltP
-2
706
Member Avatar for gman1991

[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 …

Member Avatar for abhimanipal
0
164
Member Avatar for epicbeast9022

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.

Member Avatar for epicbeast9022
0
382
Member Avatar for chunalt787

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 …

Member Avatar for Ancient Dragon
0
1K

The End.