49,757 Topics

Member Avatar for
Member Avatar for soapyillusion

Hey all I have another riveting problem from my genius professor T_T. I have to make a program using functions, reference Parameters and full string words. Now if it were just a single letter at a time this would be easy. But it wants us to let the user enter …

Member Avatar for soapyillusion
0
250
Member Avatar for ghalibsultan

Problem Statement: You are required to define a string class name string. The data members of the class are the character array and size of the character array. There should be two constructors one is default and other should be overloaded constructor. Display() is the method which display the string. …

Member Avatar for WaltP
-1
80
Member Avatar for wolfhunter777

This assignment is about a space ship fighting game. It's turn-based between the player and the computer. I'm suppose to create this function that will transfer the ship upon death to the one who destroyed the ship. For example, lets say the player manages to destroy one of the enemy's …

Member Avatar for WaltP
1
106
Member Avatar for liljazz2007

Here is the code Im trying to convert. This is my 1st time hearing about SRC Code and my teacher isnt being a big help. Please help in any way you can. Here is the code: int a = -5; int b = 3; int c; if (a == b) …

0
59
Member Avatar for rsaska

Hello, I am creating code that seemed fine, except when I entered a single character, or strings instead of numbers, the console continually prompts for user input and it is difficult to terminate the console. Below is the code [CODE] printf("\nHow many computers do you want to update?\n"); scanf("%d", &numComputersToUpdate); …

Member Avatar for rsaska
0
77
Member Avatar for c++student01

I am in a c++ class and I am doing a program which requires me to read in a text file and do change it. I need to know if something is in " " or ' ' to do this program. I can get the " " by doing …

Member Avatar for potatosoftware
0
192
Member Avatar for mingas

Hi forum! My name is Eduardo and I´m from Portugal. I´m a newbie to C++ and I hope to learn a lot with you I´m facing a doubt that I couldn´t solve yet. (I will also post this thread at c++ area, hope you don´t mind ) My doubt lies …

Member Avatar for Ancient Dragon
0
210
Member Avatar for PDB1982

Can anyone help me with this one? I have the following code and produces an output, but the Probability stays at 1 regardless of how many students I input....Any ideas? [code] #include <iostream> #include <fstream> #include <cmath> using namespace std; void main() { int numStudents, DayOfBirth, cnt; double Probability, Power; …

Member Avatar for PDB1982
0
50
Member Avatar for mybluehair

I am just being introduced into the allegro game library, and I'm making a simple program. My problem is confusing me horribly. I'm using the textout_ex code, but what I want to do is display 2 pieces of info in one textout function. Like: textout_ex(screen, font, "hello" [B][U]AND[/U][/B] MyVariable , …

Member Avatar for WaltP
0
134
Member Avatar for cool_aj

Please help me correcting my program.The question requires me to offer a repeating MENU with 3 choices. 1. Displays all students 2. choose one by entering the ID and also making changes to it. 3.exit. My error so far is "cannot convert to `int*' for argument `1' to `in".I don't …

Member Avatar for jonsca
0
1K
Member Avatar for truthuntold

I am running into problem on getting this program done. Its suppose to quiz you on your 2 powers ie(2^2 = 4, 2^22 = 2m, 2^46 = 32t) I've programmed in python for a couple years but a lot of the tricks python lets us have C++ doesn't or I …

Member Avatar for WaltP
0
97
Member Avatar for emitris
Member Avatar for WaltP
-3
207
Member Avatar for Nick Evan

[B]Background[/B] I was looking for a simple control in wxWidgets which I could use to plot out [i]some value[/i] against time, but I found that apparently I was the only one that needed that kind of graph. (so I don't know why I'm posting it... but anyway). I decided to …

Member Avatar for callmegood
0
907
Member Avatar for mybluehair

I'm just now learning Allegro, and all the tutorials I have looked at have used a function called textout_ex to print things out to the screen. [B]The problem is -[/B] textout_ex is really starting to p*ss me off horribly because of how specific you must be in the info you …

Member Avatar for mrnutty
0
107
Member Avatar for Cyberhacker

Hello my name is roman I have this project to do that involves the following: I need to take a text document full of numbers and output the lowest of those numbers and the highest of those numbers but they first have to be put into an array then outputted... …

Member Avatar for WaltP
0
124
Member Avatar for jateshs1007

Create a computer application to maintain the product inventory of a T-shirt distributor using a database. Each record will contain a T-shirt name, a price, and the quantity on hand. The inventory can manage a maximum of 30 different shirts. The database you implement should allow a user to add …

Member Avatar for WaltP
-1
244
Member Avatar for suncica2222

why do people define main() as int [B]and not void[/B]? and then write return 0; or return 1; or return -1; or return EXIT_SUCCESS; what is the point of this?

Member Avatar for Narue
0
82
Member Avatar for wwsoft

I'm making a framework for what will eventually be a game. All objects in game are derived from game_object. I store everything in vectors; The _objects_ vector contains pointers to objects. The problem is when I call update the default update() function from game object is ran instead of the …

Member Avatar for dusktreader
0
99
Member Avatar for gepo

[CODE]class monomial { public: monomial(){}; monomial(string vars); // Assignment operator [COLOR="Red"]void operator= (monomial & p);[/COLOR] monomial operator* ( monomial &p); monomial operator/ (monomial &p); bool operator== ( monomial &p) ; bool operator> ( monomial &p) ; bool operator< ( monomial &p) ; void print(); public: list<unsigned int> var;//variables separated by …

Member Avatar for gepo
0
106
Member Avatar for totalwar235

i am having a few errors compiling a code in visual C++ with my jumble word code, can anyone help? [CODE]//word jumble #include <iostream> #include <string.h> #include <cstdlib> #include <ctime> using namspace std; int main() { enum fields{WORD, HINT, NUM_FIELDS}; const int NUM_WORDS = 5; const string WORDS[NUM_WORDS][NUM_FIELDS] = { …

Member Avatar for totalwar235
0
315
Member Avatar for xcarbonx

hello, i just had a very simple question about float, so i am not going to post the full coding, only what matters in this instance. my output of program shows the computed number as 4, instead of 4.00, even though it is declared as float Here is the example: …

Member Avatar for xcarbonx
0
94
Member Avatar for jdpjtp910

I have a program that is menu driven by functions. The program gathers inventory data from the user and then the user can add, change, display (by record #), or display all records. The code works great, BUT when I add records and go to edit them, it changes the …

Member Avatar for mitrmkar
0
122
Member Avatar for uniquereason

I am trying to create a program that compares two files that contain letters from A to E. Both files have 20 of them. Now im just stuck i feel that i could use if statements but i don't know how to go along with it. Any help will be …

Member Avatar for Nick Evan
0
180
Member Avatar for AlmaREY

[I]<<split>>[/I] so you did get your program to work then??? i am running into the same problem. i get this error \prob 3.cpp(15) : error C2447: '{' : missing function header (old-style formal list?) but my programs heading looks just like all i have seen and i cant find anything …

Member Avatar for Ancient Dragon
0
272
Member Avatar for skorm909

here is my script: [CODE]#include <iostream> #include <cmath> int main() { using namespace std; int who; cout << "how are you today? good, bad, or eh?" << endl; cin >> who; if (who == "good") { cout << "ahh thats pretty cool i guess..." << endl; } if (who == …

Member Avatar for skorm909
0
352
Member Avatar for hag++

Ok, having some serious trouble here. My proffesor told us to write a progrm (what it does really doesnt matter here) however he wants a FULL color menu in the console. He showed us an example of what he wants, it was very cool, it had a red backround, then …

Member Avatar for hag++
0
558
Member Avatar for suncica2222

I dont understand this...I see this inside () is struct and BOOL is typedef for int actually ???? ,but what is (WINAPI *_CreateProcess) ????? its loks like typedef <type><type><list of types> ????? Can some one explain this? [CODE]typedef BOOL (WINAPI *_CreateProcess)( //BOOL is int??? LPCTSTR lpApplicationName, LPTSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, …

Member Avatar for suncica2222
0
132
Member Avatar for devster123456

I am currently trying to generate a program using a double nested for loop to get the following output: >Please enter the maximum integer value you wish to find divisors: 10 >List of divisors of the integer between 1 and 10: >divisors of 1: 1 >divisors of 2: 1, 2 …

Member Avatar for Agni
0
447
Member Avatar for rlindsey

Hi all, I'm having a similar problem with a code of mine. [I]<<note: split from [URL="http://www.daniweb.com/forums/post831781.html#post831781"]here[/URL]>>[/I] In my code I have a class in which I am trying to implement a dynamic array of structs. My compiler does not seem to like my deconstructor, and complains that my dynamic array …

Member Avatar for rlindsey
0
184
Member Avatar for cwarn23

Hi - it's me again. I have the following code but don't exactly know what it means or how to make the opposite code. The code I currently have is [CODE]#define rotateleft(x,n) ((x<<n) | (x>>(32-n))) #define rotateright(x,n) ((x>>n) | (x<<(32-n))) [/CODE] Then can be used like the following [CODE]a = …

Member Avatar for dusktreader
0
377

The End.