5,676 Posted Topics
Re: 1) Are you certain the program is handling 13! correctly? 2) Not easily. Do you understand how to parse strings? If so, you can try it. If not, you might want to wait a while to handle that. 3) Do not use [ICODE]goto[/ICODE]. It is considered bad programming practice since … | |
Re: Do you see a problem with [iCODE]if (minute = TimeToAlarm[g])[/iCODE]? Is the comparison correct? | |
Re: You really need to be clear and explain in detail what you need. | |
Re: Yes. Start VC. Choose the project type. Write the code. | |
Re: Or look at each character of the string and when you find a space, convert the characters you just passed over. | |
Re: Of course it will help you a lot. You won't have to do it yourself. But that's not how the Forums work. Remember the Rules you read when you signed up? 1) Start by programming 1 simple piece of the project -- Menu and Input. When you have the menu … | |
Re: [QUOTE=m26k9;1151918]Basically I have a 32-bit UNSIGNED register. I want to know how to calculate the value when I subtract 1 when the value is zero (all zero bits). [/QUOTE] So you have 32 bits of 0. Assume for argument's sake there is a 1 in the next bit (bit 33). … | |
Re: Are you asking us to write it for you? Or are you asking us to help you correct your code that doesn't work? If the first, forget it. We are not a coding service. If the second, great. But we aren't psychic and can't tell what you tried that didn't … | |
Re: Books and Tutorials. | |
Re: Copy you string a character at a time to another string. But move only the alphabetic characters. See [B]firstPerson[/B]'s link | |
Re: What seems to be wrong? It really helps to explain the problem. And if you made changes, you need to post the new code. You might also want to post just the part that has the problem. | |
Re: Why? When you see your first [B]"[/B] stop looking for [B];[/B] and look for a [B]"[/B] instead. When you find the [B]"[/B], continue looking for [B];[/B]. | |
Re: Change the input statement into calls to [ICODE]rand()[/ICODE]. Be sure you look up how to use it correctly. | |
Re: [QUOTE=bperry09;1151479]Also, my entire program is pretty big, so I didn't want to post the whole thing - I have the rest of it formatted properly (I think).[/QUOTE] That's OK, as long as what you post has the problem and we can read it. Please reformat the code. Can you actually … | |
Re: [CODE] int number_of_items; main() { //declares an array of strings string item_name[number_of_items]; cout << "How many items does the customer have? \n"; cin >> number_of_items; [/CODE] When you use [B]number_of_items[/B], what value does it have? How large is the array? | |
Re: Do not start another thread on the same subject. Continue with the original thread so we can see what came before. We do not need to tell you the same things over and over which is what a new thread will do. | |
Re: [QUOTE=wwsoft;1151303]Also , I it seems too common that people [that reply] always state the problem and never give solutions to it , frustrating ... [solution: state the solution to problems you replay to in your posts before you click "post"][/QUOTE] It also seems too common that people [that ask Q's] … | |
Re: asteroidproject\asteroidmain.cpp(9) : error C2664: 'Asteroid::Asteroid(const Asteroid &)' : cannot convert parameter 1 from 'int' to 'const Asteroid &' 1> Reason: cannot convert from 'int' to 'const Asteroid' 1> No constructor could take the source type, or constructor overload resolution was ambiguous If you define a parameter as [B]const Asteroid &[/B], … | |
Re: Also, you did not start the program by defining a console program. [B]_tmain()[/B] and [B]stdafx.h[/B] are not standard and supplied by VC because of the type of program you told it to create. | |
Re: When you enter your number, the [ICODE]cin[/ICODE] reads the number. But you also pressed ENTER. That's left in the input buffer for the next [ICODE]cin[/ICODE]. Look up the [ICODE].ignore()[/ICODE] method. That will clear the buffer. | |
Re: [B]bin[0][/B] is one value. You need to print all the values, like in a [ICODE]for[/ICODE] loop. | |
Re: [QUOTE=donelliewhyte;1150815]Thank you for that but if i wanted to search the file for other records can this code be modified to achieve that[/QUOTE] Why? Are you planning on using his code as [I]your[/I] code or were you planning on fixing your own code after understanding his? | |
Re: Display your input to the screen when you read it. That way you know if it's being read. If it doesn't display you've found the problem. you can certainly sprinkle [ICODE]cout[/ICODE] statements all over the place to tell you what is happening as the code executes. Then remove them as … | |
Re: As this is the 4th (or is it 5th) resurrection of the same lame question, this thread is going away.... | |
Re: 1) Use a [ICODE]for[/ICODE] loop. It is made to go from one number up to a second number. 2) Don't use [ICODE]conio.h[/ICODE] functions. They are not standard and are unnecessary. There are standard functions to accomplish the same thing. 3) In the loop, simply add the current number to the … | |
Re: Ahhh, I deciphered the question, which is Keeping the textbox visible, can the contents of the box be invisible... Yes, set the background and foreground color of the textbox the the same value. | |
Re: Two things: 1) Title - [B]Time interval....i need an answer pls..[/B] -- [i]i need an answer pls[/i]??? Why would you post a question and not expect an answer? Just describe the problem, don't add a useless order to it. 2) Always reread your post to make sure it is understandable. … | |
![]() | Re: Create the name using the time functions from [iCODE]ctime[/iCODE] ![]() |
Re: Try [CODE]cout << (char) tolower ( Name[2] ) << endl;[/CODE] | |
Re: It sure would be nice if links were posted :icon_rolleyes: Compilers [url=http://www.codeblocks.org/downloads.shtml]Code::Blocks[/url] [url=http://msdn.microsoft.com/vstudio/express/visualc/]MSVC++ Express[/url] [url=http://www.openwatcom.org/ftp/]Open Watcom C++/Fortran[/url] [url=http://www.bloodshed.net]Bloodshed DevC[/url] [url=http://cc.codegear.com/Free/turbocpp]Turbo C++ Explorer 2006[/url] | |
Re: Because he's a weenie and thinks people want to use Java. | |
Re: What's with all the [iCODE]getchar()[/iCODE] lines? What are the values just before the calculation? Print the values. | |
Re: [QUOTE=Buff;72095]There are 2 easy ways - 1 put it in the startup menu of windows by copying it there, 2 call it in autoexec.bat[/QUOTE] Neither accomplish what the user wants. A "service" is not started via autoexec.bat nor startup menu. Try the information at [url]http://www.overclock.net/faqs/119474-how-run-program-service.html[/url] or [url]http://kennethhunt.com/archives/001728.html[/url]. If that doesn't … | |
Re: [QUOTE=philosafari;1149154]When I do, the following errors come up (Not sure if they're interrelated): [B] 16 cannot convert `double (*)[4]' to `double' for argument `1' to `void gauss(double, double, double, int)' [/B][/quote] Look at the definition of the function and carefully check the values used in the call on line 16. … | |
Re: [QUOTE=Broseph;1149181]The only thing I can't get to work is the countValue function. [code]... //count the number of occurrences of each number in the linked list Node* countValue(Node *pHead) //<------HERE'S THE PROBLEM { ... [/code][/QUOTE] So you don't think actually explaining what the problem is could be important? Pointing to a … | |
Re: You're close. This code [icode]if((array2[i] <= 'a') ||(array2[i] >= 'z'))[/icode] says [I]If the letter is ('a' or less) or letter is ('z' or more)[/I] ... Is that what you want? Rethink this if statement. What are you really trying to look for? | |
Re: [QUOTE=soapyillusion;1145514]I had that, already these are [ sqaures right? and these are { curley correct? Im using { in that code.[/QUOTE] And what [I]should[/I] you be using? What's you book say? | |
Re: [QUOTE=vb5prgrmr;1145415]or... [code] textunit.SelStart = Len(textunit.Text) [/code] [/QUOTE] This is a [I]much[/I] better solution... | |
Re: Try: [iCODE]fp = fopen("C:\\path\\to\\file\\Keywords.txt", "r");[/iCODE] | |
Re: Your code is: [code] #include <iostream> #include <sstream> using namespace std; int main() { string line; getline(cin, line); // Create a string stream that will read from "line" stringstream ss(line,stringstream::in); // While there are more tokens... while (!ss.eof()) { string token; ss >> token; //display token for testing cout << … | |
Re: What statement causes the problem? What is the contents of the variables on that statement? | |
Re: Start your high and low with the first value read. Then compare each consecutive value with the high and low and change accordingly. | |
Re: When you enter the loop, what is the value of [I]info.regis[/I]? | |
Re: By changing your code to use the proper statements. Given the above lack of information, that about all I have for you. | |
Re: Completely worthless description without context. Start at the beginning, not the tail end of the problem. Remember, we aren't there watching how you got to this point. | |
Re: I for one refuse to revisit the exact same subject anew. You already have help in your other thread. Continue there. |
The End.