49,762 Topics
![]() | |
Ok well I got a final tomorrow and for the life of me I can not understand recursion. I have tried and tried and no hope lol. The professor gave us a study guide and I cant not figure out 2 problems. Just wondering if anyone can help me before … | |
I have some code that i need a press any key to continue command but when i put it in there it doesn't work, here's what i have: [CODE]cout << "Press any key to continue." << endl; cin.get(); [/CODE] can anyone tell me what im doing wrong? | |
I'm coding a game right now and everything works great that i want to have working right now, but there's a minor bug that i know of. this is that when the player enters their name, and the name has spaces, the code just closes. here's the part of code: … | |
I am trying to add three functions to this code so that I can add an entire list at one time to another list instead of having to add individual elements one at a time. Here is what I have so far but it is not working. [CODE]#ifndef LINKEDLIST_H #define … | |
Hi,I have an assignment that asks me to sort the words of a text (ascending) without duplicates being included. I manage to sort the words, but I just don't understand how to remove the duplicate words after being sorted. Here's my current progress : [CODE] // load a string vector … | |
Once again, I'm having trouble with my Sudoku Game. This is the last part and I'm almost there! I just need a little bit of help. According to the rules of Sudoku, there can only be once instance of each value in each column, row, and 3x3 grid. I'm writing … | |
What I have to do: I have to read numbers from a file input from the keyboard into an array, sort the numbers, and write the sorted numbers to a file. My problems are twofold: First, I don't know how big to make the array. When I try to write … | |
Hey guys I could really use some help here. In my program I need to ask the user for two 4 bit binary numbers . Then if they select add then add or if multiply then multiply. my problem is that I got the addition to work but the multiply … | |
I'm fairly new to C++. Can someone help me with a problem I'm stuck on? Below is a data file that has 3 fields in each record. I have to read the fields into a structure one record at a time. Any suggestions would be greatly appreciated. amazon.com 9250000 250 … | |
I am having issues with this program. I am confused on how and what functions to use, how to get my program to get the information from a file, and I am extremely confused on arrays. I've been reading this chapter relevant to the problem through and through and I … | |
I am trying to implement a hopfield net to learn patterns. This is what I current have.... I am current having it create a random number of patterns based on the number of neurons Next I am trying to make a weight matrix Should I have a seperate weight matrix … | |
I finished the lab, and everything works, but I just don't like the way it looks...a bit disjointed to my eye. I'm happy that it works, but I want to write robust, readable code as well as functional. So, if you're interested (have spare time) would you take a look … | |
I am working on a Dictionary project based on AVL tree. The Dictionary can add words from the input.txt. Here is the input example: 0 3 sheep,con cuu mother, me water, nuoc 0 : the code to show that you are about to add words to the Dictionary 3 : … | |
In my C++ program, I'm using ShellExecute command with last parameter as SW_SHOWMAXIMIZED to open a web page (.aspx). [CODE] ShellExecute(NULL,"open","http://localhost/WebApp/default.aspx?Page=0",NULL, NULL, SW_SHOWMAXIMIZED); [/CODE] The Internet explorer can open this web page in its maximized state if I did not set the Window Title of IE in the registry (HKEY_CURRENT_USER\SOFTWARE\MICROSOFT\Internet … | |
Hi I have an assignment where I was given a data file and put it in an array. The file looks somthing like this: [CODE]Smith John 78 70 76 72 82 84 Doe Jane 72 76 77 90 76 45 Weathers April 64 93 95 83 66 56 Brown James … | |
Hi guys, I'm trying to use a function which returns a pointer to a vector element, but it doesn't really work - and since I'm not so experienced in C++ and especially pointers, hoped that someone could help me out. The function is defined as [CODE]Obj* MyClass::FindObj(std::vector<Obj*>&, string Label_){ ... … | |
Hi guys i spend 3 weeks doing this project , but i don't know how to start implement the Delete and update , can u please help me guys .? here is my attachment and my code [CODE] #include <iostream> #include <fstream> #include <cstring> #include <cstdio> using namespace std; class … | |
Hi, I've ran into a problem with pointers which I can't seem to get my head around. Here's some code that illustrates my problem. [CODE]void Reallocate(char* Source) { int NumberTest = 0; char* Buffer = new char[4]; memcpy(Buffer, Source, 4); delete[] Source; Source = Buffer; memcpy(&NumberTest, Source, 4);//This puts the … | |
write an instruction to instantiate an object named individ of a class named group. plese help .. thank you | |
What are you using to keep track of your bugs? I use [url]www.elementool.com-[/url] it is pretty cheap and web-based, which is fine for my needs. Just wondering what the rest of you guys are using? | |
Hi, I'm relatively new to programming and would like to know how to suspend a c++ program until another program has created a certain file in linux. While it is waiting it needs to be using a minimal amount of processing power. Hope that made sense? Cheers, Andy | |
Hi guys, I need help on getting the minimal scope on something. I am learning data structures, right now i'm figuring out how to insert my class information (strings, ints, floats) into my node class. Do i need to send data to my node each by each type? or is … | |
write the header for a function named school which is public member of the class course, returns a string data type and includes 2 integer papameters named mark and grade.. i really don't know how to do that . any 1 please help .. thank you !! | |
Mhm, so, the problem I'm having here is that, once the "while (!boatList.eof())" cycle reads the first line (EDIT: I meant, how should I put it, the first "segment"), it goes on infinite (?) loop reading the other one. [QUOTE]AX 777 Valtis 0 4 500 2007 5.5 -1 50.2 6 … | |
class cube; private; float s1, s2, s3; public; void print(); float area (float, float, float); } the following class in incorrect any know how to write it correctly .. thank you Very Much For Help .. | |
hi can i have a clock in my program when it runs the clock keep running like the computer time? and how? | |
Hi friends, I would like to insert "whitespace" between the numbers of my string str3 and after concatenate with str1 and str2, as str1 << str2 << str3. This is an example: E.g.: 200 3 1 2 3 4 5 6 7 8 9 Could you help me? I had … | |
As the title says: Is the XOR Swap algorithm still viable? I know that temp-swaps are supposedly faster but the shear coolness of an XOR swap makes it more attractive to me. What do you guys/gals think? For anyone that doesn't know what an XOR swap is here goes [code=c++] … | |
Hi can any one help me with my if / else statement, I have an assignment which has to give discounts to phone calls depending on the time of call or the day. Here are the discounts Starting Time--------------Monday to Friday-------------Saturday and Sunday Before 8am-----------------40% discount-----------------60% discount 8am to 4:59pm--------------Regular … | |
[CODE]#include <iostream> using namespace std; class NumDays { private: double hours; double days; public: NumDays(double h=0) { hours=h; }[/CODE] [ICODE] how can I assign values to both hours and days, but only takes in the number of hours as its argument? I don't know how to assign the days without … |
The End.