48,986 Topics

Member Avatar for
Member Avatar for cicigirl04

Here is my code. I have a warning that (127) : warning C4715: 'ComputeSum' : not all control paths return a value [code] #include <iostream> using namespace std; const int MAX = 10; // Function prototypes, i.e., declarations for the functions we have created void ReadInput (int A[], int number, …

Member Avatar for sidatra79
0
126
Member Avatar for TheBeast32

Hi, I was reading something that said goto was bad. Why is it a bad practice to use it?

Member Avatar for Narue
0
118
Member Avatar for cplusplusgeek

I want the following program to use lesser memory as much as possible. Any suggestions? [code] #include <iostream.h> #include <conio.h> void InputNum(void); void SearchNum(int); int numArray[10]; main() { int num; InputNum(); cout<<"\nEnter the number to be searched:"; cin>>num; SearchNum(num); getch(); } void InputNum(void) { for(short i=0;i<=9;i++) { cout<<"\nNumber "<<(i+1)<<":"; cin>>numArray[i]; …

Member Avatar for Freaky_Chris
0
118
Member Avatar for ashishchoure

I just want to know the logic of how to create bouncing ball application using MFC .

Member Avatar for Ancient Dragon
0
61
Member Avatar for jklcody

I use the google data api for .net,but when excute it ,it give me a message that "unable to connect to the remote server",so I want do it as the google data protocol to do it use c++. Everyone,who can give me an example to study or some hint? thanks!

0
30
Member Avatar for AorA

[code]#include <iostream> #include <windows.h> using namespace std; void about(){ cout<<"Expence-List 14/10/2008:"<<endl <<"Brought to you by www.******.com"<<endl <<"Programmed by **********."<<endl; Sleep(4000); system("cls"); } int MenuOne(){ int MenuSelection=0; cout<<"What would you like to do?"<<endl <<"--------------------------------"<<endl <<"1. Create a new expence list."<<endl <<"2. Edit a previous expence list."<<endl <<"3. View a saved expence …

Member Avatar for AorA
0
182
Member Avatar for afromong

basically if i ask for an string i.e. i ask someone a question cout<< "is this correct yes or no?"; cin >> a; and then a number is input the program just goes crazy how do i solve this??

Member Avatar for stilllearning
0
87
Member Avatar for kenji

Hey guys I'm having a strange problem with my program and I'm not sure how to solve the problem. I have a function which takes an array clears multiple white spaces to make a sentence so [code=CPLUSPLUS] "abc def ghi" //becomes "abc def ghi" [/code] and it returns the length …

Member Avatar for stilllearning
0
69
Member Avatar for BINDERJ2

[code] #include <iostream> using namespace std; int main() { int speed, time, distance; // Get the speed. cout << "What is the speed of the vehicle in mph?\n"; cout << "(Enter a value greater than 0): "; cin >> speed; // Validate the input. while (speed < 0) { cout …

Member Avatar for stilllearning
0
177
Member Avatar for DemonGal711

Okay, I know what's wrong with my program but I don't know what to do to fix it. I have to take a program we previous made and make it a template class. Okay, sounds easy enough. I know all the writing it right cause it ran fine before, now …

Member Avatar for Alex Edwards
0
3K
Member Avatar for kittycat07us

Hi, I'm having trouble coming up with a function that scans a word, starting from bit StartingBit, until the first zero bit is found. The function is suppose to return the index of the found bit and if the bit at StartingBit is alrieady what sought, then startingbit is return. …

Member Avatar for Alex Edwards
0
412
Member Avatar for shopnobhumi

I need to write a program where it would ask the user to enter a positive even number,when entered if wrong then it would say value is illegal and will terminate the program. If it is even then program prints out the square of the number. I have just started …

Member Avatar for shopnobhumi
0
95
Member Avatar for tones1986

Hey all - i am working on a implementation of a binary tree. I have all of my code and it is from an previous project for the most part. except a few changes ... i have to use a driver program for this that creates a tree, deletes the …

0
62
Member Avatar for Razzar

Hello I have this code bellow i need some help with. im trying to make a number game but i have a problem that i cant solve, the loop i made dosent update the grid like it's supposed to do. when you first start it you will se 2 grids …

Member Avatar for skatamatic
0
122
Member Avatar for skvikas

Hi All, Here i am with another question . When i execute the code below the destructor in Stone is called twice . Why? In main [ICODE] set<Stone> stones = bag.letMeSeeStones(); [/ICODE] is coming from reference hence "stones" should not be treated like a local object. [CODE=C++] #include <iostream> #include …

Member Avatar for ArkM
0
84
Member Avatar for afg_91320

its me again! (and yes im stuck on yet another problem ***) i have created a code where the user is asked to choose a geometry formula and can solve a problem using any of the choices that are shown. now this code uses the switch function, but for my …

Member Avatar for Lerner
0
197
Member Avatar for cloudii

Hi, I'm learning intro to c++. My question is, how do I input values that come from a different text file so that the program uses those values for calculations? Basically, it gives me a list of numbers and tells me what the numbers are for... and then I have …

Member Avatar for Freaky_Chris
0
172
Member Avatar for blackryu21

I have to match up airlines for flights in c++, but for certain matchups, the value would be equal to x. I need help to do it. Here's the code I have so far: [code] #include <iostream> using namespace std; int main() { int nROWS = 4; int nCOLUMNS = …

Member Avatar for stilllearning
0
131
Member Avatar for n03ly

Hi Guys, I have an assignment to do a gpa calculator using class construction and an array of grades. The assignment is to have a class called Student and have a user enter an ID and then enter however many grades they want and then have the program calculate the …

Member Avatar for n03ly
0
714
Member Avatar for amerninja2

[COLOR="Red"]How can I get a compiler for C++ like Dev-Cpp to support chinese character and pinyin input? Like if I wanted to make a chinese program that would allow chinese input and output in the console window... Example:[/COLOR] [CODE]#include <iostream> using namespace std; int main() { wchar_t input; char loop; …

Member Avatar for Salem
0
1K
Member Avatar for arabadaba

hi there im rabdab and i really need help simplifying this codes for my assignment

Member Avatar for Salem
0
78
Member Avatar for sundar.mn

hi and hello.... I'm a class XII student of CBSE board.we have to do a project in C++ in CS for the board evaluation....so i've chosen 'Airline Reservation Forum'.....i'm posting it and i want to hear to all valuble suggestions to make my project better.. (pls do find the attachment.....) …

Member Avatar for Salem
0
125
Member Avatar for ratik

hello.... I'm working with a project.Project is ANALOG WATCH in turbo C++. My problem is that PIXELS are not displayed.I'm using outtextxy() function.as [B]outtextxy(250,300,"20")[/B]..now problem is that "20" is not display coorectly.. I'm using laptop dv pavillion 2401..with XP O.S. this is correctly working on PC....

Member Avatar for Salem
0
93
Member Avatar for kittycat07us

Hi, I'm having trouble coming up with a function that scans a word, starting from bit StartingBit, until the first zero bit is found. The function is suppose to return the index of the found bit and if the bit at StartingBit is alrieady what sought, then startingbit is return. …

Member Avatar for Salem
0
163
Member Avatar for skvikas

Hi All , I am facing some error in destructor in my class. Below is the constructor and destructor. Constructor seems to work fine . While the class get destructed it give the following error *** glibc detected *** ./main: double free or corruption (fasttop): 0x08743cd0 *** ======= Backtrace: ========= …

Member Avatar for skvikas
0
141
Member Avatar for grisha83

Hello, i have wrote a program using the while loop but it crashes whenever i run it Basically, the goal of a program is to calculate the population of a town with constant 10% growth annually and then find how many years left. here is my code (any help will …

Member Avatar for grisha83
0
138
Member Avatar for coveredinflies

Hi I am outputting data to a spreadsheet and have looped through one set of values. Later on I want to put some more values in the next column, I can move across to the next column but don't know how to get back to the top. Is this possible …

Member Avatar for coveredinflies
0
84
Member Avatar for Athos84

Hi all! I need to pass a list, like this: [code] //xmlparser.h public ref class XMLParser { ref struct Node { System::String^ type; System::String^ name; System::String^ role; }; System::Collections::Generic::List<Node^>^ xmlList; }; //form1.h #include "XMLParser.h" public ref class Form1 : public System::Windows::Forms::Form { public: Form1() { xp = gcnew XMLParser("settings.xml"); net …

0
69
Member Avatar for joed13k1941

I have to convert this program that I wrote to use switch case statements to handle user input (+, -, /, *, X). Any ideas? [code]#include <iostream> #include <string> using namespace std; int main() { double total = 0, counter = 0; char sign, X = 0; double value; do …

Member Avatar for joed13k1941
0
115
Member Avatar for alin_yuhee

i want to make a simple game with c++ but i really do not know how to do it:-/ ....can somebody help me to do that because i really want to know how to make a game by using c++...:?:

Member Avatar for William Hemsworth
0
110

The End.