49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
[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; … | |
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????? | |
hi there im rabdab and i really need help simplifying this codes for my assignment | |
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.....) … | |
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.... | |
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. … | |
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: ========= … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++...:?: | |
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 … | |
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<< ? … | |
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 … | |
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. … | |
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): "; … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 = … | |
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 … | |
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 … | |
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 … |
The End.