49,766 Topics

Member Avatar for
Member Avatar for iamcreasy

Im trying to solve ACM - 10082 [URL="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=31&page=show_problem&problem=1023"]http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=31&page=show_problem&problem=1023[/URL] Judge is responding wrong answer...but, i have no idea why. Any suggestion? [CODE] #include<iostream> #include<string> using namespace std; char change(char x); int main() { string str1; getline(cin, str1, '\n'); transform(str1.begin(), str1.end(), str1.begin(), change); cout << str1; return 0; } char change(char x) …

0
52
Member Avatar for BBKisaki

Hi Pros! I've started a project called grina ( code name) which is web browser program fro people to view web pages using C++ with Qt based on the QtWebKit module. The fact is that, i know a little about the web browser system, that it acts like a compliers …

Member Avatar for switch3d
0
166
Member Avatar for eternaloptimist

i have a few questions.: 1)if i wanted to write a line of code needed to declare a 1-dimensional array named names that can hold 8 string values would this be correct?: char names[8]; 2)how would i write the code needed to assign strings to each element of the array …

Member Avatar for eternaloptimist
0
105
Member Avatar for valeriy_zf

[B]Microsoft Visual C++ 2008[/B] My Project contains one Form1 and one Unit (module) Test1.cpp. There is the button1 on the Form1 which calls the function: [CODE]Test1::Change_Button_Text();[/CODE] There is only one function in unit Test1.cpp [CODE]void Test1::Change_Button_Text() { // #1 Form1::button1->Text = "Hello forum!"; // isn't working :( // #2 Form1 …

Member Avatar for jonsca
0
319
Member Avatar for suncica2222

I have problem with this code,I want to print names of the windows in .txt file and it compile with no errors but it snaps in runtime. this function int x = GetWindowText(hWnd,title, 256); for the second arg require char* and cant deal with WCHAR and if i cast title …

Member Avatar for Salem
0
169
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 dusktreader
-3
100
Member Avatar for clutchkiller

This is an assignment for my c++ class im taking. [code] #include <iostream> #include <fstream> using namespace std; const int NAMESIZE = 50, DATE = 25; struct inven { char name[NAMESIZE]; int qnty; double wholeCost; double retailCost; char date[DATE]; }; void displayMenu(); void addRecord(fstream &); void displayRecord(fstream &); void modifyRecord(fstream …

Member Avatar for clutchkiller
0
187
Member Avatar for VilePlecenta

While finishing up my app, I included into the project the code for loading and injecting my dll into running processes. Once compiling I received these errors [CODE]error C2039: 'getchar' : is not a member of '`global namespace'' error C2873: 'getchar' : symbol cannot be used in a using-declaration error …

Member Avatar for VilePlecenta
0
138
Member Avatar for Skeen

Okay, I'm making a shooter game, and all my weapons are differnt userdefined objects; ie. the flamethrower works differently then the gun, however, I'm calling some functions in my "main", an example of this would be; [CODE] /* <Init> */ MachineGunClass *CurrentWeapon; MachineGunClass *MachineGun; MachineGun = new MachineGunClass(); CurrentWeapon = …

Member Avatar for mrnutty
0
225
Member Avatar for liljazz2007

ANY HELP YOU CAN PROVIDE WILL BE GREAT. 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 …

Member Avatar for Nick Evan
0
242
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
255
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
81
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
107
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
60
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
78
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
211
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
51
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
100
Member Avatar for emitris
Member Avatar for WaltP
-3
208
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
916
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
108
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
125
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
245
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
84
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
100
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
107
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
319

The End.