5,676 Posted Topics

Member Avatar for dc87

[code] else { letter=letter-32; for(letter='A'; letter<96 || letter>122; letter++) { [/code] Your [I]for[/I] statement just destroyed the letter you typed in. Also, it would be better to use [I]getchar()[/I] instead of [I]scanf()[/I] to read in a character. [I]getchar()[/I] is designed to read a char whereas [I]scanf()[/I] has to process the …

Member Avatar for Aia
0
343
Member Avatar for adily

[QUOTE=adily;463105]thanks... the program will show the output that i attach in thread. one more, i don't familiar with this site. so pliss help me to enjoy with this site.... tq..[/QUOTE] To enjoy this site, read the following: [url=http://www.daniweb.com/techtalkforums/thread78223.html][b]Read Me:[/b] Read This Before Posting[/url] [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]Code Tags[/url] [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]The Rules[/url]

Member Avatar for Salem
0
99
Member Avatar for mayo_tech11

[QUOTE=joshSCH;395768]No.. I'd think it would be much more distracting than that. On the radio, you simply listen to music or short news stories with commercial breaks every once in a while. A complete audio story sounds a bit much.. but then again I have never tried it.[/QUOTE] Maybe for you, …

Member Avatar for techbound
0
2K
Member Avatar for Undermine

Create arrays for each hand and put the deck's first card in the first hand/first card, deck's second card in the second hand/first card, etc.

Member Avatar for mrboolf
0
110
Member Avatar for MidiMagic

[QUOTE=jbennet;745549]it didnt have a very long lifecycle? IE gets years and years...[/QUOTE] And it shows :icon_twisted:

Member Avatar for MidiMagic
0
320
Member Avatar for elitedragoon

[QUOTE=daviddoria;756760][QUOTE=Xeuron;756741]maybe variant argument list will do ...[/QUOTE] what do you mean xeuron?[/QUOTE] Something you don't have to worry about. Use [B]Dave[/B]'s idea. Also, [url=http://www.gidnetwork.com/b-57.html]read this[/url].

Member Avatar for elitedragoon
0
173
Member Avatar for meistrizy

[QUOTE=meistrizy;756630]It also might help if I tell you guys the whole program (*smh*...lol): [/QUOTE] It also might help to tell us what the problem is and what you're trying to accomplish. If this is the same problem as another thread, you should have just continued there.

Member Avatar for meistrizy
0
169
Member Avatar for Holy Roller

Never Ever call [ICODE]main()[/ICODE] as you are doing in your [ICODE]return[/ICODE] statements. Use a loop. Ony the operating system should be calling [ICODE]main()[/ICODE] Use a lot more whitespace to make your code easier to read. In other words, change [CODE=cpp]if(strcmp(choice, "y")==0) math=diff/i*1000; cout<<""<<x<<" more tries"<<endl;[/CODE] to [CODE=cpp]if (strcmp(choice, "y") == …

Member Avatar for VernonDozier
0
121
Member Avatar for atman

[url=http://www.gidnetwork.com/b-59.html]This series[/url] might give you some insight on [ICODE]scanf()[/ICODE]. And why would you want to use [ICODE]fgets()[/ICODE] on [ICODE]stdin[/ICODE] to read a character? That's what [ICODE]getchar()[/ICODE] is for.

Member Avatar for WaltP
0
153
Member Avatar for kotkata

After your [icode]cin >> choice;[/icode] add code to read the rest of the input buffer to clear it out, up the and including the \n. When you enter values, ALL characters you type are in the buffer, including the <ENTER>. When you read a single character, the \n is left …

Member Avatar for kotkata
0
180
Member Avatar for tech291083

[url=http://www.openwatcom.org/ftp/]Open Watcom C++/Fortran[/url] [url=http://www.borland.com/downloads/download_cbuilder.html]Borland 5.5[/url] (command line, no IDE)

Member Avatar for Salem
0
2K
Member Avatar for mayo_tech11

[QUOTE=joshSCH;391635]Movies don't really inspire me either.. except Old School, Slackers, Van Wilder, and South Park, of course.[/QUOTE] Oh my ghod! Fear the world the next generation gives us!!!! :icon_twisted:

Member Avatar for Obeledeveloper
0
326
Member Avatar for anbuninja

First, you need to learn how to [url=http://www.gidnetwork.com/b-38.html]format your code[/url]. This will help with following the code -- for you [I]and[/I] us. If we can't follow your code, we can't help much. What is the calculation for calculating the interest for one month? How did you arrive at 25.64? If …

Member Avatar for Lerner
0
115
Member Avatar for Demonisya

[QUOTE=Demonisya;736433]Hello..... I want to ask you something..... My teacher gave us our final exam last October 16 & 17.... I want to ask you about this question: Create a program that could show this output * *** **** ****** [/QUOTE] If you'd try reading your post, you'd see that the …

Member Avatar for Demonisya
0
174
Member Avatar for smeezekitty

[QUOTE=smeezekitty;746108]i have three problems first one is in vc++ 2008 express heres the code...[/quote] And the problem is....? [QUOTE=smeezekitty;746108]Second is in old turbo C++ 1.01 how can i use a similer to if ( X = X) for char instead?[/quote] The exact same way you do it in [I]VC++ 2008[/I]. …

Member Avatar for smeezekitty
0
151
Member Avatar for Taker

1200 lines of uncommented and badly formatted code. No indication what the warnings are. No indications where the warnings are. How can we possibly help you? Read each line and try to figure out what lines [I]might[/I] be the problem? Try reading [url=http://www.gidforums.com/t-5566.html]the Guidelines[/url].

Member Avatar for WaltP
0
208
Member Avatar for mattyd

Yep, pretty bad... and with a [I]grosssssss[/I] ending!!! The best IMO was in [B]Star Trek[/B]'s "Trouble with Tribbles" episode. I still want to know why fight choreographers insist that a swing with fist or sword to the extreme top of the head is an exciting move. Even my grandmother can …

Member Avatar for Jen0608
0
141
Member Avatar for joeblob17

[QUOTE=Lerner;744746]don't use the return result of eof() to determine whether the body of the loop will be entered.[/QUOTE] Why is it people just say something without explanation? Why should they listen if there doesn't seem to be a reason? [B]Lerner[/B] [I]is[/I] correct, and [url=http://www.gidnetwork.com/b-58.html]here's why[/url]. [ICODE]feof()[/ICODE] is the same as …

Member Avatar for joeblob17
0
87
Member Avatar for cog_bn

[QUOTE=ArkM;744642] Counter-question: what for start label and goto? [code=c++] for (;;) { // loop forever: it's a clear and honest construct ... } // or (I don't like this) while (true) { // longer and precious ... } [/code][/QUOTE] I agree that you should not be using [ICODE]goto[/ICODE]. And I …

Member Avatar for cog_bn
0
184
Member Avatar for riahc3

About [ICODE]scanf ("%c",&opt);[/ICODE] -- [url=http://www.gidnetwork.com/b-60.html]See this information[/url]... [QUOTE=Hempelchen;744266] "}while ((opt!="1") && (opt!="2") && (opt!="3"));" is okay because it forces the input to be 1|2|3. For a menu in c it is okay.[/QUOTE] No it's not. [B]"1"[/B] is a string but [ICODE]opt[/ICODE] is a character. Okay is [ICODE]}while ((opt!='1') && (opt!='2') …

Member Avatar for riahc3
0
161
Member Avatar for egolovin

Your best bet is to press "M<return>" and use [ICODE]fgets()[/ICODE] to read the input and process the first character. It's portable and will work on ALL compilers.

Member Avatar for ArkM
0
137
Member Avatar for Krysis

[QUOTE=Krysis;743818]Ahhhhhhhhhh! Thanks for the clarification on the memory issue and FIFO naming! So, if I instead assign two pointers to char to point to argv[4] and argv[3] THEN concat, I should be alright??? OR... not.. :-([/QUOTE] Not. Reread [B]Salem[/B]'s post, specifically [QUOTE=Salem;743785] ... if you want to extend an argv[i], …

Member Avatar for Krysis
0
138
Member Avatar for monkey_king

[QUOTE=monkey_king;742997]I've made a program using gcc as a compiler. In my loops I've been using a uint type as the type of my loop variable. But now it seems that some systems doesn't support this type. Can I make a preprocessor conditional that does a #define uint to unsigned int …

Member Avatar for WaltP
0
158
Member Avatar for MidiMagic

No problem's here, either. Fox 2.0.0.3 [B]Midi[/B], you seem to be having problems no one else ever sees. Could your OS be damaged in some way?

Member Avatar for MidiMagic
0
216
Member Avatar for NewtoC++

[QUOTE=NewtoC++;741898]Also, everyone says to avoid goto statements. Can someone tell me alternates to using goto? Like could you give me an example of where I used goto and show me another way.[/QUOTE] Sure. In general: [code] do { [I]display menu input [B]MenuValue[/B] process the menu entry selected[/I] } while ([b]MenuValue[/b] …

Member Avatar for NewtoC++
0
155
Member Avatar for koushal.vv

Start your "unique number" at 1 and increment it for each new data record. That seems to be the easiest and safest way to make all your numbers [I]unique[/I].

Member Avatar for ArkM
0
146
Member Avatar for akira_shinizaki

By reading each character one at a time. If you get to 5 and that character is not '\n', print an error and clear out the rest of the characters from the input buffer.

Member Avatar for Lerner
0
265
Member Avatar for valchid

Here, let me help you with the [ICODE]gets()/fgets()[/ICODE] question: [url=http://www.gidnetwork.com/b-56.html]Click Here[/url]. And I'm sure it's inevitable, he's going to do the same with [ICODE]scanf()[/ICODE], too, so: [url=http://www.gidnetwork.com/b-62.html]Click Here[/url] too.

Member Avatar for valchid
0
101
Member Avatar for psyman_86

What he's getting at is variables should be [I]defined[/I] only in code files, the .C or .CPP files. NEVER put a definition in a header file. Only the [ICODE]extern[/ICODE] goes in the .H file. The guards are only useful when a header file is used twice during a single compilation. …

Member Avatar for psyman_86
0
260
Member Avatar for maxicube

I wouldn't do it. Flashing a message in different colors is one of the most obnoxious things you can do to a user IMO.

Member Avatar for maxicube
0
154
Member Avatar for CMacDady

I've looked at your post for about 5 minutes and have absolutely no idea what your question is about! OK, you're having a problem with a line. The line is only for reference -- whatever that means. Where do you [I]explain[/I] what the problem is? Or what happens to show …

Member Avatar for CMacDady
0
145
Member Avatar for nectionplayer

Probably questions about programming in C. I assume lots of the stuff you learned in the course.

Member Avatar for ajay.krish123
0
65
Member Avatar for grvs

[QUOTE=MidiMagic;630891]Why I need more than 30 minutes: If you navigate to get a link or an object, when you return, the post text is GONE from the editing box. You must post it, and then edit it after you get the item into the clipboard. With the torpidity of the …

Member Avatar for punjabivirsa3
0
171
Member Avatar for madmaxx350

Did you miss the sticky post entitled [B]We only give homework help to those who show effort[/B]? Or maybe the one titled [B]Read This Before Posting[/B]? What about [B]The Rules[/B]?

Member Avatar for vmanes
0
73
Member Avatar for elsa87

Please [url=http://www.gidnetwork.com/b-38.html]read this[/url], so we can follow your code. It will also show you some problems you can fix yourself.

Member Avatar for WaltP
0
209
Member Avatar for xlx16

[QUOTE=xlx16;737704]i have two questions,please dont tell me that i violate dani web ruls because of my long questions thank u. [/quote] As [B]jbennet[/B] said, long Q's are fine, but your title is a violation. [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]See the rules[/url]. Sorry, you asked for it. :icon_twisted: [QUOTE=xlx16;737704]and the other question. [code=c] #include<stdio.h> void …

Member Avatar for ArkM
0
96
Member Avatar for nectionplayer
Member Avatar for k59smooth

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]

Member Avatar for WaltP
0
116
Member Avatar for coolbuddy059

[QUOTE=coolbuddy059;733322]I've to do a documentation of a project please tell some links of some sites where I can get the free source code of telephone directory management etc.[/QUOTE] I didn't know there [I]was[/I] free source code to telephone directory management etc. Where did you hear of this free code? Maybe …

Member Avatar for ithelp
0
95
Member Avatar for Kira71

[QUOTE=Kira71;737052]anything wrong here?[/QUOTE] Yes. In addition to what the Dragon mentioned, 1) you need to fix your [url=http://www.gidnetwork.com/b-38.html]formatting[/url] so we can follow your code; 2) you are using [url=http://www.gidnetwork.com/b-58.html]feof()[/url] incorrectly. This will cause you problems when the function seems to be working; 3) never, ever use [url=http://www.gidnetwork.com/b-56.html]gets()[/url]. Gives you a …

Member Avatar for Kira71
0
125
Member Avatar for anbuninja

Be sure to use braces {} more often. It makes the code more readable, and you'll know you are grouping statements properly.

Member Avatar for WaltP
0
140
Member Avatar for mglover070588

[QUOTE=~s.o.s~;736658]Congratulations on using: - Code tags for your first post. - [ICODE]int main(void)[/ICODE] instead of the usual [ICODE]void main()[/ICODE] for your first post. You have a bright future ahead! :-) [/QUOTE] Agreed! But loose a point for bad [url=http://www.gidnetwork.com/b-38.html]formatting[/url], making your code very hard to follow.

Member Avatar for WaltP
1
234
Member Avatar for jianna

To rephrase [B]Sillyboy[/B]'s explanation -- the functions [I]do not return a value[/I]. Therefore there is no value to test [B]==[/B] nor [B]!=[/B] against.

Member Avatar for WaltP
0
564
Member Avatar for iamdougsinbox

You have a comment [I]/* loop through linked list to find last node */[/I] but there is no loop. Only a single IF statement.

Member Avatar for iamdougsinbox
0
100
Member Avatar for chamaca24
Member Avatar for skatamatic
0
150
Member Avatar for Syrus_Jones

[QUOTE=Syrus_Jones;735722]Ok, i just realized what an idiot i am, i got the factor thing figured out, and putting in increasing order, but........can someone help me with the 4 factors per line...[/QUOTE] Count each value you output. When you get to 4, output an [ICODE]endl[/ICODE] and reset your counter. [QUOTE=Syrus_Jones;735722]... and …

Member Avatar for skatamatic
0
818
Member Avatar for Chaudharybilal

[QUOTE=Chaudharybilal;736496] i need to make a program on Human simulation....... Well what i need is a code. [/quote] We don't give code. We give help. [I]You[/I] give code. [QUOTE=Chaudharybilal;736496]when i am executing a program like am printing 'x' for infinite many times during execution when the console is printing x …

Member Avatar for Chaudharybilal
0
125
Member Avatar for vadrag

How many people have to post the exact same message? Isn't one enough? :icon_rolleyes:

Member Avatar for devnar
0
99
Member Avatar for SQ89
Member Avatar for mybluehair

Where is your [icode]main()[/icode] function? And please read [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url], especially [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies#faq_keep_it_organized]this section[/url] about thread titles.

Member Avatar for WaltP
0
92

The End.