5,676 Posted Topics

Member Avatar for kooletz

[iCODE]scanf()[/iCODE] cannot read two words easily. And it's only slightly less dangerous than [iCODE]gets()[/iCODE]. Look up [iCODE]fgets()[/iCODE]. You will have to check the last character for \n and remove it, but it's safer and easily reads the entire line.

Member Avatar for WaltP
0
190
Member Avatar for queenjay14

[QUOTE=queenjay14;]Im having some problems identifying where my error is. I've read through the post on this topic and applied the responses to my code but it's still giving me a warning. I am trying to use an array to compute the average of 10 numbers. [CODE] double sum = sum …

Member Avatar for WaltP
0
222
Member Avatar for T1205

The only question you asked is "[I]can someone help?[/I]" Maybe you need to ask different questions...

Member Avatar for WaltP
-1
477
Member Avatar for shirlpeyton
Member Avatar for WaltP
0
504
Member Avatar for kooletz

[QUOTE=Adak;]You're trying to shove a first and a last name, into the same variable, name[]. That won't work. You can fix it easily a few different ways: [snip] [CODE]char name[30]; //30 is a little small for a two name size, try 50 or 60 //fgets() is safer and a more …

Member Avatar for WaltP
0
184
Member Avatar for siddiqui_1985

[iCODE]scanf()[/iCODE] only reads up to the first whitespace (Space, Tab, Return). You want to read the entire line. Use [iCODE]fgets()[/iCODE] In general, you don't want to use [iCODE]scanf()[/iCODE] to read strings anyway. [url=http://www.gidnetwork.com/b-62.html]Here's why[/url]. Plus, think about your loop again. Do you really want the name entered to be your …

Member Avatar for HASHMI007
0
160
Member Avatar for D33wakar

Other than it doesn't work properly, do you have a question? Or is this an ego-post?

Member Avatar for D33wakar
0
151
Member Avatar for Towmator

The second thing is you need to give us a hint as to what's wrong. We aren't psychic. That's [url=http://www.flashlightcreative.net/portfolio/1-flash/38-mindreader.html]another website[/url].

Member Avatar for WaltP
0
113
Member Avatar for logicmonster

You probably have to parse the line in stages. When you get to the times, keep parsing until the format changes. Looks like times format is [iCODE]char char time time[/iCODE], so when the [iCODE]char char[/iCODE] isn't there anymore, switch to the next format.

Member Avatar for WaltP
0
150
Member Avatar for .kaine

Or to ask a more appropriate question, "[I]Do you have any links to reputable sites that review hosting companies?[/I]"

Member Avatar for chrishea
0
170
Member Avatar for Netcode
Member Avatar for farhanrocks
Member Avatar for Martin C++

[QUOTE=Duki;]The reason you continuously loop when you enter bad input is because you're trying to accept a number, but are receiving a char, and your input buffer is overflowing.[/quote] It's not because of an input buffer overflow. When you try to read a non-digit into an integer, the read fails. …

Member Avatar for Duki
0
2K
Member Avatar for Zoe123

Why did you remove all the [B]while[/B] keywords in the second post? Back to your 1st post: [QUOTE=Zoe123;]I have some menu problems. So this is my first time, and I need someone to please solve the problem for me. [/quote] We don't solve things [I]for[/I] you. We help you solve …

Member Avatar for WaltP
0
206
Member Avatar for mariegomez84

[QUOTE=mariegomez84;]Hi, everyone! I'm kind of in a hurry. I need to know [B]for tomorrow[/B] how can I open a file and get the file name.[/QUOTE] This was posted on March 6th, [B]2008[/B]!!!!! Stop resurrecting this zombie for no reason! Better yet, go ahead and try! Mwahahaaaaa!!! :icon_twisted:

Member Avatar for WaltP
0
637
Member Avatar for Eternal49
Member Avatar for JanraeMendoza

So your professor wants you to have someone write [I]file search software[/I] for you? You don't need to do anything but ask, correct?

Member Avatar for WaltP
0
77
Member Avatar for Paaat

[QUOTE=stru;]Hello.. I searched the forum for a thread that explains how to rename your username, but I couldn't find any.. How can I assign a new name to my membership here? Thank you.[/QUOTE] And you didn't find one thread titled something like "Please change my username?" You certainly didn't look …

Member Avatar for Paaat
0
137
Member Avatar for rhyza

If you need help you need to explain what you need help with we are not mind readers please explain in detail what you are trying to do what the problem is and where in the code the problem occurs the more detail the better also you need to use …

Member Avatar for WaltP
0
181
Member Avatar for gman1991

[QUOTE=gman1991;][CODE]// this is program designed to create Cd data base #include <stdio.h> #include <string.h> #include <stdlib.h> //============================================= //LINKED LIST USED FOR CREATING THE DATABASE CD //============================================= struct CD_type_node { int CDnum; char title[20]; int CDcount; struct CD_type_node* next; }; struct Artist_type_node // to create a linked list of CD's { …

Member Avatar for WaltP
0
124
Member Avatar for emmas4impact
Member Avatar for Narue
0
152
Member Avatar for opawix

1) Start *letter* at 'a' 2) Start the `do-while` loop 3) IF *letter* is not vowel 4) output the letter 5) increment the letter 6) end of `do-while` if *letter* >= 'z'

Member Avatar for opawix
0
146
Member Avatar for watery87
Member Avatar for WaltP
0
123
Member Avatar for Prankmore

[QUOTE=Prankmore;]I am trying to take a user input phone number and perform calculations on it as an integer of type long long.[/QUOTE] Why? To see if the phone number is prime? This makes no sense because a phone number isn't a number, per se.

Member Avatar for Prankmore
0
3K
Member Avatar for v1nc3nts

OK What gives? 1st post - a sh*tload of errors with no context 2nd post - code with no commentary, no questions, two days later 3rd post - worthless bump for no apparent reason 4th post - another worthless bump for no apparent reason This thread is about to be …

Member Avatar for Ketsuekiame
0
327
Member Avatar for tyochola

When programming, you need to write the program (it's writing a [I]program[/I], not writing a [I]code[/I]) in stages. Finish what you have and output the data entered at the end. Compile. Fix compiler errors. Repeat. When the program runs correctly (that means outputs the data entered correctly) then add the …

Member Avatar for WaltP
0
156
Member Avatar for theCompiler

Start at [B]Narue[/B]'s first post. The answer is there. You just have to look it up.

Member Avatar for theCompiler
0
177
Member Avatar for Duki
Member Avatar for emmas4impact

First off, [url=http://www.gidnetwork.com/b-57.html]see this[/url]. Next, [url=http://www.gidnetwork.com/b-60.html]see this, too[/url]. It contains the information that describes your problem. And [url=http://www.gidnetwork.com/b-56.html]this info[/url] is the most important of all.

Member Avatar for WaltP
0
132
Member Avatar for shanki himanshu
Member Avatar for shanki himanshu
0
179
Member Avatar for jheanal

[QUOTE=jheanal;]what is the code in timer if the user enter a negative number a dialog box will appear saying that is invalid !![/QUOTE] You wouldn't put a dialog box in a timer. [QUOTE=jheanal;]NEED THE ANSWER ASAP THANK YOU[/QUOTE] We don't feel your emergency is our emergency. We will answer when …

Member Avatar for debasisdas
0
92
Member Avatar for jaepi

[QUOTE=Salem;]> yes that is a correct way u can proceed......... Over a year late, and still you missed the better answer from ~s.o.s~[/QUOTE] Let's add another 3 years to that.

Member Avatar for WaltP
0
1K
Member Avatar for MooGeek

[QUOTE=MooGeek;]I've seen some posts of users changing their usernames. But some of them are like below 50 posts. [/quote] So? What's the problem? [QUOTE=MooGeek;]I mean why would they want to change their Usernames if they've just have less than 50 posts? [/quote] Because they decided they don't like their member …

Member Avatar for MooGeek
0
190
Member Avatar for theCompiler
Member Avatar for WaltP
0
124
Member Avatar for 2Dcube

[QUOTE=iamthwee;333757]you need kbhit()[/QUOTE] [QUOTE=iamthwee;333776]That's nice, do you think system("cls") is standard and cross platform compatible?[/QUOTE] This was hilarious!!! Suggesting a non-standard function then pointing out something that's not standard! :) Decide which side of the standard you sit on and stay there, don't vacillate. Also, [INLINECODE]system()[/INLINECODE] [I]is[/I] a standard library …

Member Avatar for WaltP
0
2K
Member Avatar for arlir

[QUOTE=arlir;]what is the matter with this code?[/quote] For one, it's a bad title for a thread. For two, no CODE Tags. For three, bad formatting. Four, old code practices from the 1980's. First things first. 1) Read the Member Rules. Make an effective title for your thread. 2) Code Tags …

Member Avatar for muktigeek
0
234
Member Avatar for aomas98

Yes, [B]zdep[/B] had posted badly formatted code to solve [B]aomas98[/B]'s problem. What grade do you think [B]zdep[/B] should get for his effort? What about [B]aomas98[/B]? Who should pass the class?

Member Avatar for Rashakil Fol
-2
177
Member Avatar for rluo502

Why not just set up a standard sort and use [iCODE]strcmp()[/iCODE]? [CODE] for i = 0 to MAX-1 for j = MAX-1 to i+1 by -1 strcmp(array[j-1], array[j])) swap if needed [/CODE]

Member Avatar for vmanes
0
231
Member Avatar for mrprassad

What does [iCODE]strtok()[/iCODE] return? Given the answer to the that question, what does [iCODE]entry[i].interface = strtok (NULL, "\t");[/iCODE] do? Same for each call to [iCODE]strtok()[/iCODE].

Member Avatar for Narue
0
157
Member Avatar for tedman102

[QUOTE=tedman102;](sorry for the lack of braces, I tried getting rid of some for less confusion. Didn't think it would work but thought I might as well try :D)[/QUOTE] 1) Don't apologize, fix it. Add braces and you won't be sorry. 2) Removing braces makes the code confusing. 3) So put …

Member Avatar for tedman102
0
430
Member Avatar for siaswar

Then write more code. Find an easy project that is just hard enough to teach you that one more thing. Then do it again and again and again. And as a student, by definition you are still a beginner. After two years, you are still a beginner. After maybe 3 …

Member Avatar for katmai539
0
223
Member Avatar for Kerlix

I get no errors when I compile --- at least after removing StdAfx.h header. What compiler? What O/S?

Member Avatar for Caligulaminus
0
312
Member Avatar for fsefsef23

[QUOTE=jess64k;]Sorry for the confusing title. [/quote] At least you tried... :icon_mrgreen: Thing #1: [CODE] if (catchvar == '-') //if there is a '-', pop off the '<' and the letter its erasing { array.pop(discardvar); array.pop(discardvar); } [/CODE] What if the sentence is supposed to be "[I]Now- the time is now![/I]" …

Member Avatar for WaltP
0
425
Member Avatar for rajatchak
Member Avatar for Netcode

People thinking before posting questions in software forums. Using CODE Tags. What a dream!

Member Avatar for iAssistant
0
95
Member Avatar for newprogramer

Start by [url=http://www.gidnetwork.com/b-38.html]formatting your code[/url] properly. You are probably getting lost, as I am, trying to decipher your code. What us the [iCODE]flushall()[/iCODE] supposed to be doing? See [url=http://www.gidnetwork.com/b-66.html]this[/url] also.

Member Avatar for WaltP
0
156
Member Avatar for fsefsef23

If I understand you correctly, [url=http://www.daniweb.com/software-development/cpp/threads/374956]this thread[/url] offered no help at all and you decided to post another thread with the exact same question? This one's closed, continue with the original. Plus, I gave you an (almost) perfect algorithm to do this task.

Member Avatar for WaltP
0
690
Member Avatar for radiata

And yet another poster that doesn't think telling us what's going wrong is worth knowing.

Member Avatar for NathanOliver
0
854
Member Avatar for mahfennex

With a C++ IDE. [COLOR="Red"]Spaces [B]after[/B] all sentences. You are writing English! Do it properly! [/COLOR]

Member Avatar for WaltP
-3
42
Member Avatar for ohhmygod

To return a value from the function and assign it to the integer [B]a[/B] (as in your code): 1) Make the function an [B]int[/B] instead of [B]void[/B] 2) Set an integer variable [B]val[/B] to some value in the function 3) [B]return val;[/B] at the end of the function 4) Set …

Member Avatar for WaltP
0
3K

The End.