5,676 Posted Topics
Re: And what if you aren't using decades-old technology? What if you're using any compiler released between 2000 and now? Or even any old compiler that isn't Turbo? | |
Re: Look up[b] strcmp() strchr() strcpy() strncpy() [/b] | |
Re: [QUOTE=Loafer;1756786]write C++ program to print the sum and average of 1 to 10 using for loop?[/QUOTE] Easy peasy. Why do you ask? | |
Re: I've never understood all this sorting of linked lists. Why not just add the node between the nodes containing the values above and below the new node? Just add them in their sorted position! | |
Re: [iCODE]strcat (string3, &string2[start-of-second-half]);[/iCODE] This passes the address of the position of [I]string2[/I] you want to add. | |
Re: [code] bool isValid(int actual_PW[], int entered_PW[], int random_Nums[]) { bool valid = false; //*****************************This is where i'm having trouble********************************** for (int index = 0; (!valid) && (index < sizeof(actual_PW)); index++) { random_Nums[index] = actual_PW[index]; if (entered_PW[index] != ) { valid = false; } } return valid; } [/CODE] #1) If … | |
Re: If all those spaces are consistently in the place you show them, use the >> operator when reading the file. It will read everything between the spaces, one set at a time. | |
Re: You've defined your ifs [CODE] if () { else } [/CODE] It should be [CODE] if () { } <===== you need this else { <===== and this } [/CODE] | |
Re: Which is more important, the car or the gas? What good is your data structure without knowing how to manipulate them via a program? And there's so many programs that don't require data structures. | |
Re: Calculate the new values for subtotal, tax, and total and put them in whatever control displays the values [iCODE]txtSubtotal.text = subtotal[/iCODE] or [iCODE]lblTax.caption = tax[/iCODE] | |
Re: From his brain. He wrote it. | |
Re: Use CODE Tags!!! [CODE] char a; // define a character scanf("%d", &a); // read an INTEGER into the character printf("%s", &a); // print the character as a STRING [/CODE] You tell Us what's wrong with the code... | |
Re: [QUOTE=rayden150;]Please help on easy C++ recursion.. PLEEASE![/quote] Don't beg. It makes you sound desperate and needy, and people will avoid your post. Try printing out some values in the function to see what is happening as it runs. | |
Re: Didn't the very first post in this forum at the top help any? You know, the one titled [B]C++ Books[/B]? | |
Re: The key to recursion is the value [B]return[/B]ed from the function. That's your main problem. Next you haven't properly defined what the function is supposed to do. Does it A) return a reversed value of the integer passed to it? B) simply print out the individual digits in reverse order? … | |
Re: [QUOTE=dwiniers;]Run the program sir and enter any file name with extension file of txt and choice number 1 add records then desplay the record by chosing number 3 that code is in parallel i want in vertical.[/QUOTE] No sir, you post what the program displays and what you want it … | |
Re: [CODE] char Account::getName() const { return *AccName; } [/CODE] is defined to return a single character, which is exactly what us happening. [B]*AccName[/B] points to the first character in [B]AccName[/B]. | |
Re: For me the question would be why would you use [iCODE]fscanf()[/iCODE] to read a single character when [iCODE]fgetc()[/iCODE] does it much more efficiently? | |
Re: Not one question was asked. Not one problem was explained. All that you said was "[I]now I am trying to total the number of students, then compute the distribution[/I]". So do it. If you're having a problem, you need to explain what it is. | |
Re: [url=http://lmgtfy.com/?q=real+basic+tutorials]Try This[/url] and [url=http://lmgtfy.com/?q=vb6+to+realbasic+conversion]this[/url] | |
| |
Re: [QUOTE=rfrapp;]Here's the function that I've made to do this, however, it's not perfect. It only works correctly for single digit numbers. Double digits and up are problematic. [CODE] //converts answer in decimal to hex void backToHex( double answer ) { int remainder; int a = answer; int b = a … | |
Re: [QUOTE=lxXTaCoXxl;]It runs fine and there are no syntax errors what-so-ever, but I'm not 100 percent sure the math is right.[/QUOTE] Then whip out your calculator and test it. Pick several cases form short to tall height and a single acceleration, calculate it old-school and see if your program agrees. Then … | |
Re: OK, you posted your assignment. You posted your code. But you didn't explain exactly what you want help with. "[I]Organize[/I]" is not a specific enough question. Although [url=http://www.gidnetwork.com/b-38.html]proper formatting[/url] would be a really good start. It helps you. It helps us. And your instructor won't have to work so hard … | |
Re: Certainly looks self-explanatory to me. You can't make a char* (sString array) equal to a single character ('s') If you think you "[I]must be mixing up my char * and char[/I]" then look at the statements in question and verify it. Why ask if that's what you think and waste … | |
Re: [QUOTE=frogboy77;1751600]And it's tuppence by the way:)[/QUOTE] Maybe in England. Across the puddle it's [I]2-cents[/I]. Closest we get to [I]tuppence[/I] is [I]Tupperware[/I]. :icon_twisted: ![]() | |
Re: As I posted elsewhere [QUOTE]Try printing out a copy of your program, grab some paper and a pencil. Sit down at a desk or a table. Start at the first executable statement in [iCODE]main()[/iCODE] and follow the program statement by statement. Write down the values of all variables. Write down … | |
Re: Where are you adding the number of evens? All I see is you returning 1. Also, you aren't breaking out of your recursion. You test if [B]n[/B] is even and return 1. If [B]n[/B] is odd, you call the function again. But you don't count the evens, and you don't … | |
Re: Well, let's follow your code: [CODE] void LL::decrement(int NewNum) { int id; // create ID with some unknown value int temp; // create TEMP with some unknown value PCB *x = front; if(x->id != 1) { while(x!= NULL) { x->id = temp; // Load the unknown value TEMP into your … | |
Re: [QUOTE=rambo1177;]You might have missed a bracket somewhere... Only such a mistake causes so many insignificant errors.[/QUOTE] And to find it, [url=http://www.gidnetwork.com/b-38.html]format your code[/url] properly. It's your first debugging tool. | |
Re: Take a look for what? Just to read it? If you're looking for help, try explaining what help you need. | |
Re: Set a maximum of 100 people. I'm sure that's more than anyone simply testing your program will enter, and if they try to enter 101 a simple error message will prevent it. | |
Re: This is a programming forum, not an investment forum. What you are asking is information on investments. Best to check elsewhere and come back with your attempt at programming the algorithm(s) you find. | |
Re: Can't you come up with something better? Sounds like Miss America... :icon_rolleyes: | |
Re: Set one value before you start testing. Only reset the value when the condition you need to test for is met. In this case, assume it's prime, set value to IsPrime. During the test phase, any other factor sets the value to IsNotPrime. At the end, if value is IsPrime, … | |
Re: [QUOTE=Labdabeta;]I have an alpha beta interface and have implemented a tic tac toe class from it. For some reason my AI tends to occasionally make stupid moves (such as making a fork rather than blocking a 2 in a row) I was wondering if anybody can see where I went … | |
Re: You aren't reading the NewLine after the numbers. When reading numbers, the system stops reading when the number is finished. | |
Re: Jeez. [url=http://lmgtfy.com/?q=C%2B%2B+compilers]Try This[/url]. | |
Re: [QUOTE=rfrapp;]I have the searching part done, but my bubble sort isn't working right. It seems right in my head, so I'm not sure what's wrong. [/QUOTE] Then get it out of your head and on your desk with pencil and paper. The mind is a very bad analog for the … | |
Re: [url=http://lmgtfy.com/?q=connect+vb6+database]Try This[/url] I fear for the future of the world... Isaac Asimov's story [url=http://en.wikipedia.org/wiki/Profession_%28short_story%29]Profession[/url] is definitely in the making. | |
Re: randNum = (rand() % range) + firstNum; [B]range[/B] is the total number you want to generate [B]firstnum[/B] is the beginning number of that range | |
Re: Just reverse the write. Do a read instead. | |
Re: We don't help people cheat. Sorry. You need to do some research to do your assignment. | |
Re: [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] … |
The End.