49,761 Topics

Member Avatar for
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
198
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
173
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
719
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 Jayaprakash.BS

Hi, I want to read .wav file from the any directory in windowsXP and draw the graph of that particular file using C or C++ code.. Can anyone help please?????

Member Avatar for ahamed101
0
78
Member Avatar for arabadaba

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

Member Avatar for Salem
0
79
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
126
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
164
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
146
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
160
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
85
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
70
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
116
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
122
Member Avatar for masterovpuppetz

I wanted know if there's a way in c++ to know what character exists at a particular x,y coordinate. for eg: suppose i used [B]gotoxy(2,5)[/B] and my cursor is now at (2,5) and i want to know what character exists next to my cursor at (3,5). How can i know …

Member Avatar for masterovpuppetz
0
144
Member Avatar for fishky

Hello guys, I'm selfstudying C++ and atm am reading about classes. I want to define ostream operator<< but compiler cant find ostream to be regular use. I'm using Visual Studio 2005 on XP SP2 and have MSDN installed. And another question - am I using proper initialisation for operator<< ? …

Member Avatar for fishky
0
1K
Member Avatar for piggysmile

Is there an algorithm in C++ to determine the digit located on a given place value of an integer? For example, 9 would be outputted as the tens value of 196. If none exists, is it possible to code it? If so, what are some of your ideas to do …

Member Avatar for Denniz
0
363
Member Avatar for IrishUpstart

Hiya gang. I am currently in need of help (again! Bollocks!). Currently, i am unsure of where to start because, well, quite simply, I am not that smart. The problem is as follows: [I]Develop a program that will solve the transcendental equation x = cos(2x) to within +/- .0001 radians. …

Member Avatar for VernonDozier
0
74
Member Avatar for Dontais

This has me a bit stumped but I must be doing something wrong here, if you don't mind checking this for me would be greatly appreciated. [CODE]int main () { int input; cout << "Enter a positive intiger to determin if it is odd or even (-1 to cancel): "; …

Member Avatar for VernonDozier
0
78
Member Avatar for jazzyangelz

Hi.... I'm a beginner at this programming thing and I need some help using nested for loops this is an assignment i have to do for my class, basically the output should be something like this.. the characters depends on what the user inputs and how many rows the user …

Member Avatar for jazzyangelz
0
92
Member Avatar for dineshgautam

Hi Currently I am working in a project in which I have to track the Audio wave file in such a way there are two threads running one for write the buffer into file and second thread is used to pick the buffer after every ten seconds. I am using …

0
40
Member Avatar for afg_91320

i have this code where i have to take user input of sales and display it as a chart. (see code/sample run below) my problem is if the user enters like $923.89, it should round down to $900 -but with the code i have, it moves it up to 1000. …

Member Avatar for Ancient Dragon
0
70
Member Avatar for arifliminto86

Hi, I got some difficulity how to move bitmap image in my application basically, the algorithm is like this, I've got CDC as m_MapDC and it already being created and DrawPoint basically use for draw truck in the mapDC but the result is there is no truck in the map …

0
53
Member Avatar for FtKShadow

Alright I have been working on this game for like a week or 2 now, but I am having some trouble towards the end. Heres the code I have gotten so far: [code=c++]#include <iostream> #include <ctime> #include <cstdlib> using namespace std; char play; int guess; bool done; int noOfGuesses = …

Member Avatar for FtKShadow
0
157
Member Avatar for NayNay33

I need help with a homework assignment. The assignment is to take a paragraph from an infile and change the words French into Freedom. Also when the phrase "an arbitrary end point" is seen I need to end the paragraph. And also if an integer if present the integer needs …

Member Avatar for NayNay33
0
133
Member Avatar for chunalt787

I am trying to compile my program and I am getting alot of these errors: [CODE]Parser.cpp:9: error: stray ‘\200’ in program Parser.cpp:9: error: stray ‘\231’ in program Parser.cpp:9: error: stray ‘\342’ in program[/CODE] That sequence of three lines just keeps repeating and repeating. These are lines 8 and 9 from …

Member Avatar for stilllearning
0
146
Member Avatar for dtaylor01

Can someone run my code template to see what's wrong? [code=cplusplus] #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[ ]) { int a = 40; //No. of hrs worked during week float b = 12.75; //Pay rate: dollars per hour float c = 510; //Weekly wages …

Member Avatar for stilllearning
0
110

The End.