5,676 Posted Topics

Member Avatar for techie929
Member Avatar for COKEDUDE

You need to read the input as characters Test each character to make sure it's a digit If so, convert the value to int/float.

Member Avatar for sumitunya
0
2K
Member Avatar for Takarakujin

Sure. [url=http://www.gidnetwork.com/b-59.html]See this[/url] and specifically [url=http://www.gidnetwork.com/b-60.html]this[/url]

Member Avatar for gerard4143
0
135
Member Avatar for techie929

Why not? Just print '|'. [CODE]#include <iostream> using namespace std; int main() { cout << "||||||||||" << endl; return 0; } [/CODE]

Member Avatar for techie929
0
79
Member Avatar for rwill357

It just means somewhere you defined a variable [B]p[/B] and didn't use it in the code.

Member Avatar for WaltP
0
171
Member Avatar for gajji2020

[QUOTE=gajji2020;1129346]I am done wid the ouput but iam not able to do the Vertical lines "|".. can anyone help me.. wid the logic. I am doing preorder... [/QUOTE] [I]wid?[/I] Is this some kind of slang in India? Since I can't follow your program even [I]with [/I]CODE tags, and your explanation …

Member Avatar for WaltP
-2
137
Member Avatar for bluelinebrotha

[QUOTE=bluelinebrotha;1134222]Hey all, Currently I live in Maine, but as of late, I would like to take my family to IL and get a fresh start. The only problem is finding a tech job down there while still living here. Any tips on how I might go about doing this? Thanks, …

Member Avatar for GRaymer
0
81
Member Avatar for Aliun

Looks to me like you need to explain in detail what the problems are -- and [I]where[/I] in the code you're having problems. I don't see a problem in [ICODE]compShip()[/ICODE] which it sounds like you're complaining about.

Member Avatar for Aliun
0
999
Member Avatar for karanshah

When would you like it? How complex should we make it? Can you teach us what a music cutter is? How do we read the music? Convert from what to what?

Member Avatar for vb5prgrmr
0
88
Member Avatar for vijaysoft1

[url=http://www.daniweb.com/techtalkforums/thread78223.html]Maybe this will help more[/url] tan the other link

Member Avatar for mrnutty
0
273
Member Avatar for darkagn

[QUOTE=padtes;1127853]The only thread I got negative, in my honest opinion, are from idiots to put it mildly. And I get down graded? The reputation and power to change reputation is really beyond my ability to understand.[/quote] I don't really see your problem. You have 9 positive rep posts and only …

Member Avatar for Ancient Dragon
0
469
Member Avatar for TSaunders84

I don't know what you need there doesn't seem to be anything wrong with the getline statement what is wrong with the binary search you should really explain the problem so we understand the difficulty when you don't we just don't have any clear idea what might be wrong because …

Member Avatar for TSaunders84
0
88
Member Avatar for DoEds

1) Use consistent formatting. [url=http://www.gidnetwork.com/b-38.html]See this[/url] 2) You should know loops by now, use them. 3) I see no counters -- important is you want to count things 4) I see no comparisons -- also important for obvious (I hope) reasons. If you don't know about 3&4, you're not ready …

Member Avatar for WaltP
0
111
Member Avatar for ls3095

Maybe it might be a good idea to look up [B]switch[/B] in your book. Books generally explain these things.

Member Avatar for WaltP
0
137
Member Avatar for react05

[QUOTE=react05;1134645]Nevermind. No one answered but I got it now.[/QUOTE] Well, someone didn't ask a question.

Member Avatar for WaltP
0
81
Member Avatar for techie929

Completely depends on what you know. Since you gave us no hint (i.e. code) there's not much to explain.

Member Avatar for techie929
1
131
Member Avatar for RayvenHawk

[QUOTE=dusktreader;1134008]You're asking for a solution to your homework? I'll give you a hint: Depth First Search.[/QUOTE] Only good for a tree. I think you mean Permutations.

Member Avatar for dusktreader
-1
88
Member Avatar for sk8ndestroy14

[QUOTE=sk8ndestroy14;396227]Kennedy didn't deliver the promised air support during the bay of pigs invasion and betrayed the ani castro cubans and the CIA in not doing so. The CIA was then humiliated. [/QUOTE] I heard just the opposite. Kennedy did not want the Bay of Pigs to happen. But the CIA …

Member Avatar for brandonyy4u
0
741
Member Avatar for tquiva

A clarity suggestion: You are using a variable names [I]number[/I] to control the loop. But [I]number[/I] is not a number. It is an EOF indicator. I recommend all variables be named something that indicates their real use -- in this case maybe [I]indicateEOF[/I] or [I]EOFentered[/I]. Something like that.

Member Avatar for biswajit_cs07
0
122
Member Avatar for nikhil.laghave
Member Avatar for yila

[QUOTE=yila;1132791]that's why i never use them, braces till is absolutely necessary i hate to fight my way thru a forest of {{{{{{{}}}}}}} and if i put to many of them i always got errors at my compilation as i got them messed up.[/QUOTE] So sad. You have bad formatting practices …

Member Avatar for WaltP
0
179
Member Avatar for lrh9

Interesting that people believe the alleged [I]separation of church and state[/I] exists. Are you unaware that when after the country was founded, a prayer was said at the opening of a Congressional session? When did this practice stop? If there is a separation, how do you explain [url=http://en.wikipedia.org/wiki/Chaplain_of_the_United_States_Senate]this[/url], [url=http://en.wikipedia.org/wiki/Chaplain_of_the_United_States_House_of_Representatives]this[/url], and …

Member Avatar for jwenting
1
768
Member Avatar for iamcreasy

[QUOTE=mitrmkar;1133679]The condition you have in the [ICODE]while()[/ICODE] is not working. [/quote] But why not? Maybe an explanation is in order so the error does not happen again... [code] while(cin) { getline(cin, str); s_v.push_back(str); } [/code] In this code, the loop exits after [ICODE]cin[/ICODE] is in an error condition. After reading …

Member Avatar for WaltP
0
131
Member Avatar for mmasny
Member Avatar for johndoe444

So use [ICODE]%u[/ICODE] for unsigned decimal instead of [ICODE]%d[/ICODE] for signed decimal. And declare your variable as [ICODE]unsigned[/ICODE].

Member Avatar for WaltP
0
2K
Member Avatar for abbajee

I have no idea why every post here is resurrecting an old thread with completely off topic questions, but it won't happen again...

Member Avatar for WaltP
-3
164
Member Avatar for COKEDUDE

[QUOTE=COKEDUDE;1132853]When you have a function and need to scan for 2 different numbers, should the scanf be in the function or in the main() and why?[/QUOTE] No, you should not put the input in the function. The function's purpose is to do calculations, so keep it simple. Maybe another function …

Member Avatar for WaltP
0
153
Member Avatar for COKEDUDE

[QUOTE=gerard4143;1132977]This was written quickly...I hope its correct..[/QUOTE] Would it have taken long to give the code a quick test? And there is no reason to call [ICODE]exit()[/ICODE] every time you need to stop a program. A simple [ICODE]return[/ICODE] will exit the program from [ICODE]main()[/ICODE]

Member Avatar for gerard4143
0
112
Member Avatar for COKEDUDE

It's actually much more difficult than [B]jephthah[/B] described. In order to make sure the user types only the correct thing, you need to look at all the characters entered and test each character for validity (called [I]parsing[/I]). [I]Then[/I] you can decide to convert the values into integers and floats or …

Member Avatar for WaltP
0
200
Member Avatar for suncica2222

If you want 30 minutes: Call time() to get the current time - say [I]tstart[/I] Add number of seconds in 30 minutes to [I]tstart[/I]. Call time() every cycle -- say [I]tnow[/I] When the [I]tnow[/I] >= [I]tstart[/I], call function2. When function2 returns, reset [I]tstart[/I]

Member Avatar for suncica2222
0
149
Member Avatar for COKEDUDE

Do you know what a [I]void function[/I] is? Do you know what it returns?

Member Avatar for COKEDUDE
0
184
Member Avatar for AmigaCarolena

[QUOTE=AmigaCarolena;1132869]Gee, I'm sorry. I really don't need attitude, I need help. If you cannot reply in a decent manner, please don't reply. [/quote] No one gave you attitude. You [I]have[/I] been notified about CODE tags before, and ignored the information. [QUOTE=AmigaCarolena;1132857]/*O.k. I am down to a few less errors. I …

Member Avatar for EngSara
-2
141
Member Avatar for maprinz

[url=http://www.daniweb.com/techtalkforums/thread78223.html]How to ask for help on this forum[/url]

Member Avatar for WaltP
-2
33
Member Avatar for MrYrm

Please use punctuation so we understand your question. Your 1st sentence is barely understandable. Please [url=http://www.daniweb.com/techtalkforums/thread78223.html]read this[/url], and note the title.

Member Avatar for MrYrm
0
173
Member Avatar for Narue

hi, whats the challenge here? im not going to write you the code so you can submit it your teacher. you have not imposed any sort limits on your sort algorithm such as x^2 running time. i could write you a bogosort to solve your problem but its not practical. …

Member Avatar for dusktreader
7
2K
Member Avatar for aya_brea

[QUOTE=THEOUTLANDER;1027980]ok i have made a calculator using turbo c but it keeps disappearing when i choose the run command can any body help me please [/QUOTE] Maybe if you USE CODE TAGS and [url=http://www.gidnetwork.com/b-38.html]Format your Code[/url] we might be able to help you. But your code is unreadable without formatting.

Member Avatar for peter_budo
-3
2K
Member Avatar for c1979h

[QUOTE=c1979h;1131148]Okay I changed the counter variable to maxValue and I now get an 3 output errors and one before for error, here is the code [/QUOTE] You claim there are 3 errors. Do you think it might be helpful to let us know what they are? After 15 posts, you'd …

Member Avatar for jonsca
0
125
Member Avatar for newcuser

Although not perfect, your formatting is [I]much[/I] better. Thank you. [QUOTE=newcuser;1131990]I am getting a compile error I do not understand on the line printf statement right below the end of the do while loop. It says printf identifier. Help?[/QUOTE] That's because there is no such thing as a [ICODE]do while[/ICODE] …

Member Avatar for jonsca
0
203
Member Avatar for chriselda
Member Avatar for zhaviere
Member Avatar for mrnutty
0
2K
Member Avatar for adrawat

[QUOTE=adcodingmaster;1129517]Instead of reading character by character use "fread" to read more than 1 character from file at a time. And then use "fwrite" to write them to the output file. You can also use "fgets" to read a file line by line. Because "fgets" terminates reading on "\n" (new line …

Member Avatar for adrawat
0
399
Member Avatar for cassds

Look at the code for the [ICODE]SetYear()[/ICODE] and [ICODE]GetYear()[/ICODE] routines. The answers are there. Or are you supposed to write them?

Member Avatar for cassds
0
830
Member Avatar for CppBuilder2006
Member Avatar for newcuser

[QUOTE=newcuser;1131090]Here is what I have so far. Suggestions??[/QUOTE] I suggest you explain the problem. We aren't psychic...

Member Avatar for mitrmkar
0
183
Member Avatar for exonwarrior

How can we possibly tell you what's wrong with the code without seeing it?

Member Avatar for Salem
0
169
Member Avatar for ewangari

NOT UNTIL YOU READ [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]THIS[/url]! And stop yelling. We can 'hear' you.

Member Avatar for WaltP
0
43
Member Avatar for xrv1

Define "won't run" 400 lines of code with no idea what we're looking for nor why is not going to happen easily.

Member Avatar for WaltP
0
128
Member Avatar for terabithia

[QUOTE=terabithia;1127420]Hi.. I suppose to have a programe to read a data from a file and enqueu it to the Queue. The programme works like a Priority queue whether the ladies queue need to be inserted to queue first before the gentleman... But i think i need to try first how …

Member Avatar for scott.vass
0
3K
Member Avatar for suta6

[B]d[/B] is the remainder of n/10. If n=32, d=2. There is no [B]d[/B] in the previous problem.

Member Avatar for WaltP
-2
90
Member Avatar for COKEDUDE

[ICODE]return x;[/ICODE] will return the value [B]x[/B] to the calling routine. If you called the function with [ICODE]rt = func();[/ICODE] [B]rt[/B] will contain whatever [B]x[/B] was. [ICODE]break;[/ICODE] will immediately exit a loop even though the loop is not finished. [code] for (i=0; i<10; i++) { --stuff-- if (i == 7) …

Member Avatar for WaltP
0
255

The End.