49,761 Topics
| |
[CODE] cout<<"Enter the first string:"; string first_string; getline(cin,first_string); cout<<"Enter the second string:"; string second_string; getline(cin,second_string);[/CODE] when the code is as above the there is nothing read through the strings. [CODE]cout<<"Enter the first string:"; string first_string; getline(cin,first_string); getline(cin,first_string); cout<<"Enter the second string:"; string second_string; getline(cin,second_string); getline(cin,second_string);[/CODE] however, if the code is … | |
Can someone give me the complete code of the following problem: [B]Problem Statement: Movie Rental Store [/B] You are required to write a program for Movie Rental Store. The basic idea is that user/reader will provide customer information, movie name, and number of days. Upon this information your program will … | |
Hi guys can someone PLEASE give me the gnu C++ int class. Im trying to create a wrapper class to wrap the int class. | |
ok im makeing a web browser in c++ and im relitvly new to it can some one tell me the codez to put in for these things [CODE]Notify Icon open and close *HotKey* [/CODE] * = i want hot key to Send The Url To the webbrowser when i hit … | |
Hi all, First I create a dynamic buffer and set all element to zero. Then add a int value first to the buffer. Then after that int value add a string to the buffer, actually at the end of int value. But seems my code overwrite each other. Here is … | |
This might seem really, really cheeky (shout at me if you want) but if anyone has the time and wouldn't mind reading through my assignment, telling me if the information looks OK (it's only for a pass so not much detail is required) I'd be more than grateful. Thanks :) … | |
i've writtn a code in c and it works well, so i tried to write the same code but in c++, ofcourse i need to change some functions to cpp, i did that, but when i run the program i got the follow error : (a function-definition is not allowed … | |
Hello, I'm wonder what static references are. Are they like: [code] static int number = 0; [/code] I'm really confused. Thanks for any help. | |
Hi, I have a VC++ desktop application. It is an SDI application with some HTML views. When I close the application and re-start the machine I m facing BOOT FAILURE error. Then I give load the BOOT CD and select repair it things will work fine. This is not replicable, … | |
please i need help in my c++ assignment its about loop ( while and for) and i cant do it im gonna write it and hoping if any one can solve them before 25\10 pleaaaaaaaaaaaaaaaaaaaaaaaaaaase 1- write a c++ program that will read in the integer N, and calculate: a) … | |
why does this have an exception in VC++ 2008 Express: [CODE]#include <conio.h> #include <iostream> using namespace std; class A { private: int a; class B { public: void f(); }; public: B b; //A(){} // default constructor class C { public: int a; }; B g(B); }; void A::B::f() { … | |
I have this code which I need to be compiled in 64-bit mode but have no 64-bit capable compiler. First of all, could somebody compile this code for me and put the executable on filedropper.com or something? And second of all, does anybody know of a free 64-bit capable compiler … | |
hi.. our frst semester was now ending.. n our instructor leave dis problem for us to had.. she told us to create a program that supplies a number and outputs its equivalent in words.. the maximum input number is 9000... sumbody knew dis?? plzz help... thank u n advance... | |
Hi, I want the program code for the below question. Write program to create a class called Student including functions like get_data() and put_data() to get marks of student and display it. Thanks & Regards, Lohith | |
hello ! i have a probelm which i'm unable to understand.i'm programming in Dev-C++.when i'm compiling the programm i've written it's showing 'compiled successfully' without any error message,but when i want to run it is giving the message 'project not compiled' and hence not running the program.I can't understand what's … | |
I need to read in numbers from a .txt file and sort the numbers to find the 3 highest and i can not figure out how to accomplish this. I'm so lost i dont even know where to start. :( | |
Hi. I'm having trouble making a simple calculator. The code I have so far compiles, but it does not run. Right now I only have addition in because I wanted to make sure I was going in the right direction before I added anything else. I have to use a … | |
I have this program that calculates students grades. It asks for each students test scores individually then gives their total score and percent, then loops for the next student. But after the user is done inputing all the students scores, how do you create a function of some sort to … | |
THis is my assignment question... MyCar Sdn. Bhd. sells new cars. The manager of MyCar wants to develop a system that can do storing, searching, modifying, deleting and printing all information of all selling cars by the company. As a programmer, you are required to develop a system that can … | |
Im trying to write a program thats uses call function, but for some reason the program. Can someone help point out what i might be missing in the code? [CODE]#include <iostream> #include <cmath> using namespace std; void timeoffall(); void velatimpact(); int main () { double h; cout << "Please enter … | |
Hey all. I have worked with a project to create a basic student database/registration system for the past 4-5 projects... slowly adding more functionality or using different containers and classes etc. For this next project, i am to use the code from a website online which contains all the nescessary … | |
Quick question regarding the Fraction class created in the header file. Someone in my group used this in the header and I was wondering if there was an alternative to coding it than what they used. Something simpler for me to understand. It seems they just took a shortcut. [CODE]public: … | |
Does the constructor create an instance of a class? or is it a member function of a class that is invoked automatically after the creation of the object is compeleted? same question about the destructor; does it deallocate the object itself or does it have the responsibility of making the … | |
Hey, I'm creating a kind of database for a College project that stores values in a txt file. The thing is, it's currently set to "values.txt" and everytime the program runs, it over-writes it. Basically what I want it to do is ask create a .txt file depending on the … | |
Hello. I am currently working on a school project. I need to implement 4x4 matrix multiplication with multi-threads (pthread) doing each multiplication. By studying the assignment description and other codes found online, I was able to get a general idea of what I need to do. However, I am having … | |
Hi this is the code for life, universe and everything problem, where the program stops only when the user inputs the number "42" I tried to understand the problem, but could not make it that how the program stops at exactly 42. Any help would be extremely appreciated. [CODE]#include <iostream> … | |
Hi, i am new in c++. I am doing an assignment where I need a menu for user to select the operation. My menu coding is as below. [CODE] int main() { myCarSystem b; char ch; string temp1, temp2; double temp3, temp4; while(1) { cout<<endl<<endl; cout<<" My Car System Operations … | |
Hi.. How do I skip the first line of a text file. I am not using getline() so I think I cannot use ignore() function. Is there any other way to ignore first line ? [CODE] ................. FILE *in; char line[1000]; char *token; in = fopen(argv[1],"rt+"); if( in == NULL) … | |
Greetings all, Peace. I have a problem. I need to download visual c++ 2005 express edition (long story why this one). I cannot find out where to get the correct download. I found this [URL="http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&displaylang=en"]here[/URL] this is for the Microsoft® Visual Studio® 2005 Express Editions Service Pack 1. However, when … | |
hey, for a class project I have to write a parser for a grammar that my professor is giving us. I have broken it down into a very small part and want to get that working before parsing an entire string. In this bit of code, the string to be … |
The End.