5,676 Posted Topics
Re: 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] | |
Re: [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? | |
Re: [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 … | |
Re: 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] … | |
Re: 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 … | |
Re: 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. | |
Re: Help with what? You have to ask a question we can answer. All you did is describe the assignment. | |
Re: 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 … | |
Re: 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 … | |
Re: [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. … | |
Re: [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? | |
Re: [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 … | |
| |
Re: [iCODE]system(program.exe)[/iCODE] | |
Re: [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? | |
Re: Nice try. Homework questions are generally not designed to be tricky. They are designed to teach. [B]Narue[/B] is correct. | |
Re: 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. | |
Re: 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 … | |
Re: What function are you calling to actually perform the wait? All I see is math done on the value to wait. | |
Re: [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 … | |
Re: 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. | |
Re: [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 … | |
Re: 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 … | |
Re: [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. | |
Re: 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 … | |
Re: 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 … | |
Re: "C INPUT FUNCTIONS" brings up sites with help on input functions in C. | |
Re: [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 … | |
Re: How about a Hello World program with variations: Hello Country Hello Planet Hello Person etc. | |
Re: 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 | |
Re: [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 … | |
Re: See if there is a function called [iCODE]clock()[/iCODE] | |
Re: I don't believe this code compiled. There is no [iCODE]DisplayList()[/iCODE] | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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? | |
Re: Look at your parameters. What does the function require? What are the actual definitions of the variables? | |
Re: [QUOTE=suncica2222;1136002]thank you! thread solved[/QUOTE] Then why didn't you mark it solved? | |
Re: 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. | |
Re: That's because each line you mentioned is extremely wrong. Look up [iCODE]do-while loop[/iCODE] to understand the syntax of the statement. | |
Re: 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. | |
Re: Maybe [url=http://lmgtfy.com/?q=adOpenDynamic]this[/url] will help | |
Re: 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. | |
Re: 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) … |
The End.