49,761 Topics
| |
Hi; i am trying to write complex.cpp and it gives error message can somebody look and write me back what is wrong here is the program[ three parts] and the error message [CODE] #include<iostream> #include<cctype> #include<cstdio> #include"complex.h" using namespace std; void main(void) { CComplex a; CComplex b(5.5,2.2); CComplex c(b); cout<<"a … | |
Hi, I would like to be able to use an api for reading/writing to a file database. Basically, I will have to write programs that have recovery (meaning if it shuts down, etc. it has a file/files to recover from). I could attempt to write something myself but if it … | |
Hello All, I am new to programming and have several books on starting out with C++. I was just curious if there was a publication that has a list of codes and there functions and Syntax. Perhaps with examples of how they are used. Kind of like an Encyclopedia? Thanks, … | |
Hi all and thanks in advance for any help. I have a basic program that needs to read a number of inputs from a user. To all these inputs I assign a default value before I call for the user to give diffrent input. Here is the thing, the input … | |
hi, [B]for( turbo c++)[/B] :eek: is there anyway my program can recognize words :idea: :!: . for eg. cin.getline(sentence,10); :rolleyes: "Hello how are you?" then the program recognises the words - hello, how, are , you and prints "im fine". :) and if i cin >> " hello how are … | |
I am actually having two problems. The first is initializing a char array to a single space for all elements. I have the loop to do this but the assignment to the value: " " is returning a compile error: error: invalid conversion from `const char*' to `char'. Then, when … | |
Hi there. I am using Operating System: Windows XP Project: Visual Studio 2003 C++ MFC Dialog Based Application I subclassed an edit box control because I want to capture the WM_KEYDOWN messages when a user enters characters in the edit box. I need this because I want to measure the … | |
Hello, I am just messin around with this "A Simple Win32 GUI Introduction" snippet I found on this site. I am able to paste it in to a simple project in my Visual C++ application and run it. Basically it is just a blank window. It says you can play … | |
c program to find smallest among three numbers without using comparsion operator C program for the simulation of unix grep command | |
For those of you who are familiar with this app. I am having some difficulty configuring the # statement to call the header file. I edited the .cfg files necessary and added the /bin directory to the windows (xp) environment and still no luck. When attempting to compile a simple … | |
First of all i hope i am posting this in the right place. Anyway, i have recently purchased a copy of sam's teach yourself c++ in 21 days (fourth edition.) and have realy gotten stuck into it with the dream of being able to create some cool programs. i want … | |
I define a class which hold some variables first: [code] class Command{ string cHandle; int numPara; vector<int> cPara; public: Command(); Command(string ucData); //...............more functions here }; //end of class definition [/code] Then I declare an object of Command and wanna store it in a vector [code] vector<Command> cv; Command c; … | |
i.e. . . [code] #include<iostream> void EatFrisky(Cat *Cat); int main() { Cat * Frisky = new Cat; EatFrisky(Frisky); return 0; } void EatFrisky(Cat *Cat) { delete Frisky; std::cout<<"Someone ate Frisky!\n"; } [/code] | |
I have this function in a Dog Class and for some reason, the age nearly always ends up being 77. I can't seem to tell what the problem is. Any ideas? [code] void Dog::setage() { while (1) { int age; std::cout << "Please Enter " << itsname << "'s age: … | |
I must ask user number of students who took test, then create a dynamic array and then get the scores for each student. Then calculate the sum,average of the scores. My problem is that once it calculates it continues to ask user for student scores. I am confused with this … | |
i'v got a very annoying problem. each time i put my Sims cd in my disk drive this message always comes up: [i]Microsoft Visual C++ Runtime library[/i] [i]Runtime error![/i] [i]program c:\Program Files\Maxis\The Sims\Sims.exe[/i] [i]Abnormal program termination[/i] someone please help, iv tried evrything, i havent got a clue what visual C++ … | |
Can anyone help with a program that would allow you to enter 5 floating point values into an array called Marks and then calculate and displays the average of the marks entered? Also need help with a second program that manipulates an array of 7 integers according to the following … | |
in one file I define [code] void Show(char* s){ string str =" "; str+=s; cout<<str<<endl; } [/code] then in main I call it by [code] char s[100]="Testing..."; //or use *s here, make no difference Show(s); [/code] output nothing but blank. weird? | |
Simplify my problem I put a short version of code here, first header file: [code] namespace xxx{ class util{ public: static int MAX_PATH ; util(); static void init(); static void do(void); }; //end class int util::MAX_PATH ; } [/code] cpp file: [code] namespace xxx{ util::util(){ init(); } void util::init(){ MAX_PATH … | |
Hi guys, I was making a program a few months ago in C++ and in this program I used cin.getline but I found if I used this more than once in the same function some of the cin.getlines would be ignored once the program was compiled. I was just wondering … | |
hi, I know it's me again. It's HW, and I'm supposed to write a program that grades an example of 20 questions. I'm supposed to store the correct answers in an array. And then ask the user to enter the student's answers for each of the 20 questions, whic should … | |
So I had this nifty program on my calculator that I wrote that sloves quadratic equations for me. I decided it would be good practice to try and write it in C++. I've actually had 4 different versions, each one (atleast in my opinon) getting better than the last. When … | |
I'd like to team up with another beginner in C++ to write a role playing game. I'm a beginner also. Is there another beginner that would like to work with me as a team to make something? Please, no flames. The goal is to write a game that will use … | |
Hello. I'm learning C++ out of Sams Teach Yourself C++ in 24 Hours and Accelerated C++ Practical Programming by Example. I've heard these are both good references. Anyway, I just learned about classes and I was wondering how one makes an array of class objects. here is the Cat class … | |
I recieved a warning error as below [C++ Warning] HMLP.cpp(4): W8058 Cannot create pre-compiled header: write failed which was refer to the code below #pragma hdrstop After check with help file in Borland C++ Builder 6 the statement was as below This warning is issued when pre-compiled headers are enabled … | |
ok - challenge number 2: What now if i would like to input letters and the letters would be displayed as numbers? For instace i would like to input b a d and it would display me the corresponding numbers. The opposite of what Mr.Dave Sinkula (look thread:[B]Need help with … | |
Hi, I am developing a program in c++ and what i want to do is to assign an integer to a character. To become more specific i want to make an alphabet and assign to each letter a number. So far so good. The problem is that i want it … | |
hi, I'm trying to write a program that separate an array into 2 arrays, odd and even numbers. but I don't know how. can you please help? I'm stuck and don't know how to continue. This is what i have so far //this program accepts 10 integers, stores in an … | |
Hi there. I am currently working on a project to identify users using their typing dynamics. I want to record the intervals between characters as a user type in their passwords and use these recorded intervals to identify the users. I am using Windows XP and Visual Studio C++ 2003 … | |
i m having one doubt regarding hybrid inheritance . i m just a beginner so its not clear to me :confused: DOUBT: WHY THE FOLLOWING CODE IS GIVING AMBIGUITY ERROR #include<iostream.h> class a { public: void f() { cout<<"base class\n"; } }; class b:private a //visibility mode private { public: … |
The End.