49,761 Topics

Member Avatar for
Member Avatar for skorm909

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?

Member Avatar for skorm909
0
3K
Member Avatar for skorm909

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: …

Member Avatar for skorm909
0
207
Member Avatar for ThrasherK

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 …

Member Avatar for thelamb
0
287
Member Avatar for Revillio

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 …

Member Avatar for Clinton Portis
0
1K
Member Avatar for brycematheson

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 …

Member Avatar for VernonDozier
0
438
Member Avatar for Spiffy P Mcgee

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 …

Member Avatar for Clinton Portis
0
275
Member Avatar for smeghead007

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 …

Member Avatar for smeghead007
0
95
Member Avatar for newbee3

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 …

Member Avatar for C++Challenged
0
234
Member Avatar for xCrusade

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 …

Member Avatar for Chris911
0
3K
Member Avatar for lotrsimp12345

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 …

Member Avatar for lotrsimp12345
0
494
Member Avatar for mommabear

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 …

Member Avatar for Clinton Portis
0
318
Member Avatar for vuhailuyen

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 : …

Member Avatar for vuhailuyen
0
124
Member Avatar for bubbleT

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 …

0
61
Member Avatar for Cqinzx

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 …

Member Avatar for Clinton Portis
0
213
Member Avatar for BimBam

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_){ ... …

Member Avatar for jonsca
0
174
Member Avatar for Jeddahforever

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 …

Member Avatar for Ancient Dragon
0
123
Member Avatar for kerp

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 …

Member Avatar for kerp
0
116
Member Avatar for glamourhits

write an instruction to instantiate an object named individ of a class named group. plese help .. thank you

Member Avatar for daviddoria
0
65
Member Avatar for mkowlowitz

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?

Member Avatar for daviddoria
0
50
Member Avatar for abarkwith

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

Member Avatar for nezachem
0
58
Member Avatar for claudiordgz

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 …

Member Avatar for thelamb
0
172
Member Avatar for glamourhits

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 !!

Member Avatar for alaa sam
0
83
Member Avatar for Firo

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 …

Member Avatar for Fbody
0
177
Member Avatar for glamourhits

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 ..

Member Avatar for alaa sam
0
87
Member Avatar for alaa sam

hi can i have a clock in my program when it runs the clock keep running like the computer time? and how?

Member Avatar for Ancient Dragon
0
63
Member Avatar for sadsdw

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 …

Member Avatar for sadsdw
0
95
Member Avatar for ShawnCplus

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++] …

Member Avatar for arkoenig
0
221
Member Avatar for steve_Student

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 …

Member Avatar for Jason Giggs
0
143
Member Avatar for knellgust

[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 …

Member Avatar for xikkub
0
293
Member Avatar for xikkub

Using GLUT, moving my mouse in the display window causes the animation to increase in speed. When running at an initial 60fps, moving the mouse causes the animation to accelerate and increase to 1000fps. My data might be wrong, but there is definitely a timing issue. I've tried implementing a …

Member Avatar for xikkub
0
307

The End.