5,676 Posted Topics

Member Avatar for terence193

A letter is just an integer value. 41 = '1', 65 = 'A', 97 = 'a'. It all depends how you display the value, as a character or as an integer. 1) Do not edit a post [I]after[/I] someone responds to it. It makes their response seem wrong. 2) [iCODE]fflush(stdin)[/iCODE] …

Member Avatar for WaltP
0
192
Member Avatar for peachekeen

[b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for metronomu
0
134
Member Avatar for astrolegacy

[b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for WaltP
0
252
Member Avatar for cafegeo

Advice #1: Reformat so the code is readable. Your indenting makes the code unreadable. [url=http://www.gidnetwork.com/b-38.html]See this[/url].

Member Avatar for PrimePackster
0
159
Member Avatar for eblanco1

Read the [I]entire line[/I] as a string and look at the input character by character. You post your code that shows your attempt and explains what happened. Then we will help you make corrections.

Member Avatar for Narue
0
589
Member Avatar for learner guy

[QUOTE=learner guy;]plz see if my validRook algorithm is correct[/quote] It helps if your ask a specific question about your code that we can answer. Just asking us to check if your algorithm is correct by reading code is difficult -- at least from a beginner's code. It's best to 1) …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for IcyFire

It's because when you enter [B]Y[/B] or [B]y[/B] aren't you also pressing [B][enter][/B]? You are leaving the [B][enter][/B] in the buffer for the next input statement. You need to clear your buffer. I leave that exercise for you to search out. A couple problems, though: Never call [iCODE]srand()[/iCODE] inside your …

Member Avatar for IcyFire
0
2K
Member Avatar for Rizvi404

[b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for WaltP
0
123
Member Avatar for f4fjks
Member Avatar for WaltP
0
80
Member Avatar for UNDER-18 FG

Your C syntax is completely wrong. Nowhere in your code do you even attempt to find the 2 highest marks.

Member Avatar for WaltP
0
89
Member Avatar for d.h.2011

[QUOTE=d.h.2011;1697366]Hi, I need to do a depth first search tree for the following undirected graph: [CODE] 1-2-3 | | | 4-5 6 | | 7-8-9 [/CODE] (Sorry about the graph being so unclear, the dots are just to space the lines out). It says to start at A which I'm …

Member Avatar for nchy13
0
107
Member Avatar for terence193

[iCODE]srand()[/iCODE] must be called [I]only once[/I] -- at the beginning of the program.

Member Avatar for terence193
0
132
Member Avatar for supersuru
Member Avatar for supersuru
0
303
Member Avatar for dmanjunath
Member Avatar for WaltP
0
166
Member Avatar for Amiet Mhaske

With what? We have no idea what you've done! [b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your …

Member Avatar for Amiet Mhaske
0
116
Member Avatar for gizmo7008
Member Avatar for dvidtrnh

You will also find it easier if you fill out the [I]tens[/I] array so you don't have to do any math to get the correct subscript: [CODE] char* tens[] = {"---", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"}; [/CODE] Now when you get the tens digit [B]2[/B] it …

Member Avatar for WaltP
0
270
Member Avatar for carolinatech

[QUOTE=carolinatech;]Hey all, I have a question how would I go about perform a comparion for two boxes. I would have to find the length, width, and height of both boxes and compare the volume of them to see which box would have be larger.[/QUOTE] You've got the solution exactly...

Member Avatar for WaltP
0
78
Member Avatar for jonspeidel

Never never NEVER call [iCODE]main()[/iCODE]. [B]NEVER[/B]! It's an entry point to your program not a normal function. Why call [iCODE]exit()[/iCODE] (twice) when all you need to do is [B]return[/B]?

Member Avatar for WaltP
0
253
Member Avatar for CNA Training

[QUOTE=Narue;]You may quote and reference Daniweb content, but you may not reproduce the content. The difference is that a quote is a relatively small part of an article written in your own words, and reproduction is a large scale copy/paste of our content with little or none of your own.[/QUOTE] …

Member Avatar for Narue
0
219
Member Avatar for lupacarjie

1) Never use [icODE]goto[/iCODE]. Use a [iCODE]while[/iCODE] loop instead. 2) [url=http://www.gidnetwork.com/b-38.html]Format your code[/url] properly. It's difficult to follow and mistakes are made with bad formatting. 3) Always call [iCODE]srand()[/iCODE] once [I]and only once[/I], at the beginning of the program. 4) Never use [iCODE]system("cls");[/iCODE] while programming. It's hard to debug code …

Member Avatar for lupacarjie
0
1K
Member Avatar for terence193

Are you supposed to A) input 10 numbers and not output duplicates? B) input numbers until 10 numbers are output? It's not quite clear. Another option to each of the above is to set an array of 101 integers (0 to 100). Zero them all. As you read in a …

Member Avatar for zeroliken
0
112
Member Avatar for pudge343

Please forget the good [B]Captain[/B]'s 2nd and 3rd explanations. Even [B]I[/B] would find them confusing if I was trying to learn loops. Just concentrate on his first example.

Member Avatar for Schol-R-LEA
0
253
Member Avatar for johnnycock
Member Avatar for pseudorandom21
0
129
Member Avatar for itzcarol

There is not one error mentioned in the original post other than a vague "[I]output doesn't look right[/I]". Without any details, what can we say?

Member Avatar for jmichae3
0
2K
Member Avatar for kjcjk

Please, guys ([B]Schoil-R-LEA[/B] and [B]kjcjk[/B]), stop writing the code for people. [I]They[/I] need to figure it out, [I]we[/i] should point the way, but not fix the code.

Member Avatar for WaltP
0
236
Member Avatar for lmytilin

Make an array of 10 strings. Put each line read into this array. After you've read 10 lines, start overwriting the strings from string[0]. In other words: read line 1 --> load string[0] read line 2 --> load string[1] read line 3 --> load string[2] read line 4 --> load …

Member Avatar for WaltP
0
594
Member Avatar for nyuszi

Do not change [B]j[/B] inside your loop. All you need to do in the inner [B]j[/B] loop is: 1) Compare [B]b[/B] with the current [B]x[/B] value (you are doing this) 2) If less than, replace [B]b[/B] with the current [B]x[/B] value. That's it.

Member Avatar for nyuszi
0
142
Member Avatar for Raaz_mystery

[QUOTE=Raaz_mystery;]Hi Guys. My doubts are related to Brute Force Attack but let me Tell you first that it has nothing to do with the Hacking/Cracking. So please dont block/remove my Post on this Forum. I want to study more about Brute Force Attack because it is in my Subject (i.e. …

Member Avatar for TrustyTony
0
98
Member Avatar for randolph.gamo

[QUOTE=randolph.gamo;]hi guys i need help.[/QUOTE] Really? I was wondering why you joined. [QUOTE=randolph.gamo;]In fact it's an assignment.[/QUOTE] Really? Why else would you have come here? [QUOTE=randolph.gamo;]I'm fed up with this stuff.[/QUOTE] Really? Why do we care? Get to the point... [QUOTE=randolph.gamo;]This is my code.[/QUOTE] And nice code it is. Indented …

Member Avatar for WaltP
0
133
Member Avatar for beantine

You example and one of [B]L7Sqr[/B]'s example violates a very [I]important[/I] part of your task, namely: [QUOTE=beantine;]Ideally the data should be entered from the user using scanf (hence the int num within the function for a for loop)[/QUOTE] Why try to load the data in a different way? Just concentrate …

Member Avatar for WaltP
0
2K
Member Avatar for theCompiler

Neither do we since we didn't write it and don't know know what else you want to do with it.

Member Avatar for WaltP
0
119
Member Avatar for otreblag

Don't use Rich Text. Just read the fie in as normal text. Read in as much of the file as you can. Do your search. Since you have most if not all of the file it's now a simple matter to back up 20 lines and start printing.

Member Avatar for otreblag
0
132
Member Avatar for rhn94

[b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for rhn94
0
259
Member Avatar for Rizvi404
Member Avatar for hkdani
0
139
Member Avatar for Ravic85

[QUOTE=griswolf;]P.P.S. <rant>[B]Why[/B] are you using a raw array in a C++ class? (Yeah, I see what the prof says to do, but it is, in my opinion, a very poor use of your time and the compiler.) Introductory C++ should make much use of the STL and all the built …

Member Avatar for griswolf
0
767
Member Avatar for kashyapchhabria
Member Avatar for Minami

Major problems: 1) [B]Randomize[/B] should be used when the program starts, not when you click your button. 2) Never use [B]GOTO[/B], it's unnecessary and in your case does nothing worthwhile. 3) In line 13, how can [B]luckyno = arrayno(check)[/B] since [I]arrayno(check)[/I] has no value? 4) And through whatever magic might …

Member Avatar for WaltP
0
218
Member Avatar for diafol
Member Avatar for diafol
0
235
Member Avatar for morph214
Member Avatar for amit_as

[b][boilerplate_help_info][/b][code] Posting requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for nHulk
0
6K
Member Avatar for theCompiler

Why are there so many worthless posts here? The answer is extremely simple: There is no function (why would there be?) Use = on 2 consecutive characters. [QUOTE=zeroliken;]Here's the answer plus it has a string function[/quote] We don't [B]give[/B] answers here. We help them [B]fix[/B] their attempt. As for your …

Member Avatar for nHulk
0
5K
Member Avatar for terence193

[b][boilerplate_help_info][/b][code] Posing requests for help must be well thought out if you want help quickly and correctly. Your post did not meet the criteria for quality help. You may get some posts, but are they going to be useful? Check your post with these checkpoints - what is it [i]you[/i] …

Member Avatar for terence193
0
228
Member Avatar for slygoth

Concatenate "C:\\wmplayer.exe " and [I]fname[/I] into a char* and use that variable.

Member Avatar for peter_budo
0
195
Member Avatar for slygoth

[QUOTE=Ancient Dragon;]concatenate the two strings before calling system [QUOTE=slygoth;]PERFECT thanks a million[/QUOTE] [/QUOTE] Gee, what was it I said? Oh yeah, [QUOTE=WaltP;]Concatenate "C:\\wmplayer.exe " and [I]fname[/I] into a char* and use that variable.[/QUOTE] :icon_rolleyes:

Member Avatar for WaltP
0
255
Member Avatar for Kinneranand

Depends on many things like: what's in the file? where the file is? is it protected? is it encrypted? is is broken? is it locked?

Member Avatar for Narue
0
72
Member Avatar for Santi1986
Member Avatar for Ich bin würdig

I'd start by learning to [url=http://www.gidnetwork.com/b-38.html]format your code[/url] properly. Then understand that [iCODE]main()[/iCODE] has never been a [I]void[/I] function. [url=http://www.gidnetwork.com/b-66.html]See this[/url]. Further know that [I]conio.h[/I] and [iCODE]getch()[/iCODE] are nonstandard and should not be used. There are [url=http://www.gidnetwork.com/b-43.html]standard ways[/url] to do what you are trying to do. And last, what makes …

Member Avatar for Ich bin würdig
0
155
Member Avatar for Mopikope

1) count the number of characters and when you hit your magic number output a \n 2) call [B]srand()[/B] [I]only[/I] at the beginning of your program, never in your function

Member Avatar for WaltP
0
103
Member Avatar for Vasthor

When you enter numbers (like your [I]doubles[/I]) the [B]ENTER[/B] is left in the input buffer, since it's not a number. You need to clear it before reading a string or a character. Look into the [I]cin.ignore[/I] method.

Member Avatar for Vasthor
0
252

The End.