49,767 Topics

Member Avatar for
Member Avatar for Lance5057

Ok so I have a game setup that allows the 8 to move around inside a small room. It works fine except that every keypress lags one "frame" behind. So whenever a key is pressed it does the last keypress that was given. How do I make it react immediately …

Member Avatar for daviddoria
0
117
Member Avatar for Jason Giggs

When we define an array, we have to declare its size before the program can be compiled. How can we specify it's size, say, by inputting a value from the user. I know a way with pointers; any other way?

Member Avatar for daviddoria
0
68
Member Avatar for exoticgurl

How to make a fibonacci pragram..can u help me.? high = 1 ; low = 0 ------------------------ high = 1 ; low = 1 high = 2 ; low = 1 high = 3 ; low = 2 high = 5 ; low = 3 high = 8 ; low …

Member Avatar for Jason Giggs
-2
87
Member Avatar for ProjectAce7

I am creating a program which includes converting numerical grades to letter grades but I'm stuck where I have to put a counter that counts number of letters. For example if 90-100=A and 90, 96, 87, 96 are entered, to count and display something like Number of As= 4 or …

Member Avatar for jonsca
0
2K
Member Avatar for Lance5057

How would you create a certain amount of objects based on user input? Like I have an enemy class and the player chooses how many enemies they want on the screen, how would I create those objects? Thanks

Member Avatar for caut_baia
0
84
Member Avatar for Alkaline8214

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 …

Member Avatar for Alkaline8214
0
272
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
289
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
442
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
276
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
96
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
236
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
499
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
336
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
127
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
216
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
177
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
125
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
117
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
175
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
85
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
88

The End.