5,676 Posted Topics

Member Avatar for EvilNerd
Member Avatar for Tango2010

1) Actually look at the information about CODE tags, don't just guess. 2) Is [ICODE]while(!=feof(definitions))[/ICODE] a valid while statement? 3) Don't use [ICODE]feof()[/ICODE] to control a loop. [url=http://www.gidnetwork.com/b-58.html]Here's why[/url]

Member Avatar for WaltP
0
162
Member Avatar for mrinal.s2008

[B]Nathan[/B]'s version: [ICODE]fout << v1[i] << "\n";[/ICODE] [B]mrinal.s2008[/B]'s version: [ICODE]*out_it = *p;[/ICODE] Are they similar? Do both forms work?

Member Avatar for mitrmkar
0
300
Member Avatar for xcarbonx

[QUOTE=xcarbonx;1139023]hello, i have been struggling with this program for a few days now, and have decided to get some feedback. * * * * If anyone has any questions on any of my code or program description please let me know. Thanks![/QUOTE] Why would we have questions? I think it's …

Member Avatar for tetron
0
137
Member Avatar for doddware

As [B]Narue[/B] implies, the [B]!![/B] is 'converting' the integer value to boolean. The [B]!x[/B] equates to true/false. The additional [B]![/B] reverses the value. So if [B]x = 23[/B] (which is an implied true), [B]!!x[/B] is 1 (strict true). If you need a strict true, it's obviously useful, but if [B]b[/B] …

Member Avatar for Salem
0
185
Member Avatar for wtvrinc

If the missing values are always the last in the line, then as [B]jonsca[/B] suggests read teach line using [ICODE]fgets()[/ICODE] then use [ICODE]sscanf()[/ICODE] to read the line into the variables. But you also mention "[I]a bad character[/I]". Do you mean there are letters in the input that will mess things …

Member Avatar for kesh1000
0
89
Member Avatar for ndali
Member Avatar for tquiva

Your [ICODE]if[/ICODE] statements [CODE]if (type = 1) if (type = 2) if (type = 3) [/CODE] are [I]setting[/I] [ICODE]type[/ICODE] to the values 1, 2, 3 and each [ICODE]if[/ICODE] is executed because of that. Look up the comparison operators again.

Member Avatar for WaltP
0
120
Member Avatar for alexa868

Help with what? You have to ask a question we can answer. All you did is describe the assignment.

Member Avatar for jonsca
0
135
Member Avatar for EvilNerd

I would recommend 1) in the loop 2) after you input the choice. 3) probably using a [ICODE]switch[/ICODE] statement or a series of [ICODE]if[/ICODE] statements. Functions would be useful too. Also, I would recommend not using [ICODE]scanf_s()[/ICODE] -- or any of the [ICODE]*_s()[/ICODE] functions -- because they are useful in …

Member Avatar for Anarionist
0
191
Member Avatar for anthony5557

What you're asking help with makes no sense. VB? What's that have to do with C++? And why do you need a header? Forget everything but your first line -- "[I]I have to write a program with a class that will take the number of the day in a year …

Member Avatar for jonsca
0
161
Member Avatar for Jeff_5_7

[QUOTE=Jeff_5_7;1137938]ok i have a 2d array and i want to trace through it. The Array is RDL DLU i have an entry point of Row1 Col1 which i think is letter R. On this array R means shift right L is shift left U shift up and D shift Down. …

Member Avatar for Jeff_5_7
0
519
Member Avatar for blakenbama

[QUOTE=blakenbama;1138875]How can i capture the value of void account::depositFunds() and then be able to use it in the getBalance() function. That's what i think needs to happen, but i don't know how to do it.[/QUOTE] What [I]value[/I] can [ICODE]void account::depositFunds()[/ICODE] have? How can that value be used?

Member Avatar for WaltP
0
1K
Member Avatar for Marson

[QUOTE=Marson;1138878]I think I should rephrase. The keyword is being input by the user, so I don't think a structure in the code with the keyword and number of times it appears will work since the keyword could be anything. Unless I am misunderstanding, which is completely possible haha[/QUOTE] Do you …

Member Avatar for WaltP
0
186
Member Avatar for Anarionist
Member Avatar for kangarooblood
Member Avatar for Anarionist

[QUOTE=Anarionist;1138087]MSG msg ; HWND hwnd; WNDCLASS wc; to me this syntax looks like msg hwnd and wc(all lower case) are variables is this right? [/QUOTE] Yes. [QUOTE=Anarionist;1138087]and with the exception of wc would changing the other 2 change anything?[/QUOTE] Change what to what?

Member Avatar for mitrmkar
0
92
Member Avatar for aswin cp

Nice try. Homework questions are generally not designed to be tricky. They are designed to teach. [B]Narue[/B] is correct.

Member Avatar for tintin.iitk
0
305
Member Avatar for tquiva

Since this is the earlier first post, I will assume this is the thread you don't need. Do not post the same question by creating new threads.

Member Avatar for WaltP
0
77
Member Avatar for ruin

Did you forget to read [B][url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url][/B] and the post [B][url=http://www.daniweb.com/forums/thread78060.html]Read This Before Posting[/url][/B]? How about all the information on CODE tags like 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in the announcement at …

Member Avatar for jonsca
0
112
Member Avatar for jimJohnson

What function are you calling to actually perform the wait? All I see is math done on the value to wait.

Member Avatar for necrolin
0
154
Member Avatar for CSStudent728

[QUOTE=CSStudent728;1137669]Hello everyone, Background: I am currently attempting a project for a professor of mine, but I cannot integrate my formula properly into my code. The project calls for a conversion from numbers to words. (I last worked in C++ a year and a half ago, so any words that don't …

Member Avatar for WaltP
0
124
Member Avatar for DuffManLight

You always output the 3 digits followed by ','. Assume you have 10. Follow the code with that value to see why the comma is output.

Member Avatar for WaltP
0
1K
Member Avatar for amia
Member Avatar for wale89

[QUOTE=wale89;1137305]Can someone help me with this code.. I have a function which is InsertNode() it is use for inserting a new node after the index in the double link list.. For example I want to add a node of value 6.0 after position 3 This is the code i write..but …

Member Avatar for mrnutty
0
99
Member Avatar for akssps011

A GUI is not necessary. Long before there was windows, there were editors. The way to get started is-- Code [B]nothing [/B]until you do the following: Design how you --[LIST] [*] accept the file name [*] display the file after reading it [*] move through the file when you can …

Member Avatar for WaltP
0
173
Member Avatar for nike_jj4

[QUOTE=nike_jj4;1137593]Thanks once again 4 the help, but does this code look like it can do the sorting job aswell? (it's just matter of my personal satisfaction) :) Salut[/QUOTE] Why are you asking? Does it work? If not, no. If so, yes.

Member Avatar for WaltP
0
107
Member Avatar for cyberguy007

There's so much wrong 1) you input the line into a pointer with no space, overwriting who-knows-what 2) you use [ICODE]feof()[/ICODE] to control the loop -- [url=http://www.gidnetwork.com/b-58.html]see this[/url] 3) formatting, though not disgusting, isn't great. 4) you never count the occurrence of any values, you just add 1 every time …

Member Avatar for WaltP
0
155
Member Avatar for fplgenius

When you enter 10 characters using [ICODE]gets()[/ICODE] you overrun the buffer you are inputting into by at least one character, wiping out data you should not be touching. [url=http://www.gidnetwork.com/b-56.html]See this about[/url] [ICODE]gets()[/ICODE] Create a loop and use [ICODE]getchar()[/ICODE] instead. [ICODE]getchar()[/ICODE] is designed to input 1 character at a time as …

Member Avatar for NathanOliver
0
92
Member Avatar for COKEDUDE

"C INPUT FUNCTIONS" brings up sites with help on input functions in C.

Member Avatar for WaltP
0
112
Member Avatar for return_Milk

[QUOTE=return_Milk;1137443]A couple things to mention: 1.) This program uses system("PAUSE"); in the main function, if you are not using Windows, you might have to pull it.[/quote] Then you shouldn't use it at all. Keep your programs Standard so you don't have problems when you change compilers. [url=http://www.gidnetwork.com/b-43.html]See this[/url]. [QUOTE=return_Milk;1137443] HERE …

Member Avatar for return_Milk
2
140
Member Avatar for porchia

How about a Hello World program with variations: Hello Country Hello Planet Hello Person etc.

Member Avatar for WaltP
-2
59
Member Avatar for superdhebz

Simple. Split this line [ICODE]return( fib (num-2) + fib (num-1) );[/ICODE] into 1) compute the value 2) print the value 3) return the value

Member Avatar for WaltP
0
97
Member Avatar for newcuser

[QUOTE=mitrmkar;1136834]I think you are just 'moving too fast'. Study the documentation, for example [URL="http://msdn.microsoft.com/en-us/library/z5hh6ee9(VS.80).aspx"]fopen_s()[/URL].[/QUOTE] Actually, for all the [ICODE]*_s[/ICODE] functions -- stop using them. They are not standard which makes it very difficult to help you, and will make it difficult to write code if you need to use a …

Member Avatar for mitrmkar
0
405
Member Avatar for paddy8788
Member Avatar for wale89
Member Avatar for wale89
0
190
Member Avatar for james_bond007

It would also be nice if you'd look at the code posted on the forum and reformat it for your next post so [I]we[/I] can follow what is happening. Pretty code is much easier to read.

Member Avatar for WaltP
0
2K
Member Avatar for ace8957

What do you do now to change from player 0 to player 1? I see no attempt to switch. All your winner function does is look for a winner. It doesn't return who the winner is. If that's enough, OK. Otherwise, you might want to think about it a little …

Member Avatar for ace8957
0
3K
Member Avatar for babyd_

The Member Rules state "[I]Do not post threads with generic subjects such as "HELP ME" or "PROBLEM". Instead, clearly state a phrase describing the problem as the thread's title.[/I]" Please post proper titles next time. Also, we aren't psychic. How can we possibly figure out what help you need with …

Member Avatar for jonsca
0
98
Member Avatar for mswezey

Because if [ICODE]mazeArray[readRow][readColumn][/ICODE] is north you go up one row. Then if the new [ICODE]mazeArray[readRow][readColumn][/ICODE] is south, you go down one row. now the new [ICODE]mazeArray[readRow][readColumn][/ICODE] is north (we know this because you were just there) you go up one row. Then.... You need to keep track of which directions …

Member Avatar for WaltP
0
158
Member Avatar for dude1

[QUOTE=dude1;1137009]i need to make a program that reads in a file and list things like the number of characters,words lines spaces tabs etc. anyone know the best way to do this? any help anyone can provide is appreciated thanks[/QUOTE] Make a list what you need to keep track of. Add …

Member Avatar for WaltP
0
100
Member Avatar for kavithabhaskar

You should not be doing [ICODE]while (!myfile.eof())[/ICODE] -- [url=http://www.gidnetwork.com/b-58.html]here's why[/url] (feof() and .eof() are identical) After you've read all the lines in the loop, what do you expect [ICODE]getchar()[/ICODE] to read?

Member Avatar for necrolin
0
267
Member Avatar for faaz

Look at your parameters. What does the function require? What are the actual definitions of the variables?

Member Avatar for restrictment
0
772
Member Avatar for suncica2222

[QUOTE=suncica2222;1136002]thank you! thread solved[/QUOTE] Then why didn't you mark it solved?

Member Avatar for WaltP
0
91
Member Avatar for Kakespade

Thank you for using code tags, but The Member Rules state "[I]Do not post threads with generic subjects such as "HELP ME" or "PROBLEM". Instead, clearly state a phrase describing the problem as the thread's title.[/I]" Please post proper titles next time.

Member Avatar for NathanOliver
1
141
Member Avatar for Dyed Purple

That's because each line you mentioned is extremely wrong. Look up [iCODE]do-while loop[/iCODE] to understand the syntax of the statement.

Member Avatar for Dyed Purple
0
131
Member Avatar for thakur.ravi26

Why? This thread has been dead for months. We could have given you an infraction instead for resurrecting a dead thread and for giving an answer to someone's homework question -- IOW cheating. Consider yourself lucky.

Member Avatar for Salem
0
191
Member Avatar for jemz
Member Avatar for WaltP
0
105
Member Avatar for i_luv_c++

Have you learned anything about converting numbers to strings? Any string manipulation at all? If not, you do not have the knowledge yet. Give it a couple weeks and return to this question. You should have the concepts by then.

Member Avatar for i_luv_c++
0
163
Member Avatar for jemz

How can you not find information on CODE TAGS 1) in [url=http://www.daniweb.com/techtalkforums/faq.php?faq=daniweb_policies]the Rules[/url] you were asked to read when you registered 2) in the text at the top of this forum 3) in the announcement at the top of this forum titled [url=http://www.daniweb.com/techtalkforums/announcement8-3.html]Please use BB Code and Inlinecode tags[/url] 4) …

Member Avatar for WaltP
0
132

The End.