48,985 Topics
|
|
Hi, I'm a beginner. Could anybody help me out with this. How to make a class [B]strin[/B] subtraction operator overload, that if it finds "Bill", then deletes it from the text string. Thank you in advance. [CODE] #include <iostream.h> #include <string.h> class strin { char *place; int length; public: strin … |
|
Hi, it's been awhile since I've been here and the site has changed quite a bit, I like it. Anyway, I attempted to make a basic calculator program, but I'm getting some weird error messages. The error messages tell me that there are syntax errors, but I've looked through the … |
|
Hi guys, I am working on a project on playing cards using enum and class. I really need help with the function defination in this project, Here i will attach the question, your help will be highly appreciated. You can get bac to me trough jeymineb at yahoo.co.uk. Thanks. If … |
|
I use VC++ 6.0 WinSNMP Programming I have problem with WINSNMP. I use function smiUINT32 dwMajor, dwMinor, nLevel, nTranslate, nRetransmit; SnmpStartup(&dwMajor, &dwMinor, &nLevel, &nTranslate, &nRetransmit); and during linking it shows errors : Linking... AlaDlg.obj : error LNK2001: unresolved external symbol _SnmpRegister@24 AlaDlg.obj : error LNK2001: unresolved external symbol _SnmpStartup@20 Debug/Ala.exe … |
|
I've read some of your thoughts on student postings and while I am keen to do things on my own behalf I have hit a wall. I've slaved at this project, mainly because I've not done any programming before, but i can't get my code to run and can't seem … |
|
I am having problems with error checking. I want to ensure that the user puts in a name with characters and not use numbers. My thinking is that since player_name is data type char that using ( !player_name) should indicate not to input an int. any suggestions on how to … |
|
i have win xp home edition... and my compiler is dev-C++ although i dont think its a compiler issue.... This is my project needs: (my attempted code follows) ( Write a main function with all required internal functions subprograms (defined later) that tracks your college classes, grades and GPA. Sample … |
|
Hello, I've coded the following which works to a certain extent! I've managed to get the vectors working with int but not with my class... [php] #include <iostream> #include <vector> using namespace std; class BankAccount { public: //void setAccount(int num, double amount); taken out replaced by constructor BankAccount(int num, double … |
|
;) Hello ladies and gents, Ive written this class time in wich I have to use operator+ to increase the hour with a certain amount of minutes like this: time t0 (23, 59), t1; // t0 = 23.59 t1 = t1 + 120; // t1 = 1.59 Problem is, I … |
|
sorry about the lenght of code: [php] #include <iostream> using namespace std; class Shape { public: Shape(int,int); Shape (); virtual ~Shape(); virtual void print()const = 0; virtual double calArea() = 0; protected: int centreX,centreY; }; ////// CONSTRUCTORS //////////////////// Shape::Shape(int x, int y) { centreX = x; centreY = y; } … |
|
I have a few questions that I was hoping somone here could answer. 1. how can i pause my cout output? or is it possible to do it without calling a system command 2. is there a way to clear the console screen without makeing specific os comands? 3. does … |
|
Hi everyone First of all I am glad that i found this forum...I would like to humbly request all the knowledgeable people here to express their views on this........ I am an accountant by profession and completely novice to the world of computers.All i know is how to check emails, … |
|
below is my code the whole program is for prompting user to enter 10 nos. b/w 20 to 100 it will while is there to check wheter the user entr the corect number or not, it will also check that the entered number is unique and was not previously entered … |
|
I HAVE SPECIFIC QUESTIONS!!! 1. Why do you need [b]Self-Referential Classes?[/b] Please provide a "real" life example of when it would be used. [code]class Node { public: Node(int); void setData(int); int getData() const; void setNextPtr( const Node *); const Node *getNextPtr() const; private: int data; Node *nextPtr; };[/code] 2. ^^^What … |
|
Hi Friends, Again i m here with my problem. I m developing a very large project and i m using a huge memory model in my borland turboc++ 3.0 compiler. What is happening is that when i m compiling my program,it is not generating any errors but when i m … |
|
I am a noob and would like to write a program that will take user input for a server name, plug that server name into a drive mapping statement, check for certain files in the mapped dir, and copy files to a backup location. I don't know where to start … |
|
I've been taking an accelerated C++ program for 3 weeks now...my current assignment is to write a program that, with user input of a mortgage loan amount, the term of the loan, and the interest rate, display the monthly payment. Then list the loan balance and interest paid for each … |
|
My assignment is to create a definition of the class [B]Box[/B] and a structure definition. The class definition needs the following: [COLOR=Navy]Data Member Data Type[/COLOR] [B]boxNumber int boxType int boxLength float boxWidth float boxHeight float[/B] [B]boxArea float boxCost float boxPrice float boxProfit float[/B] boxFile fstream [COLOR=Green]//Dont include boxFile yet.[/COLOR] Member … |
|
ok so i am a hs student learning some c++ and recently learned the fstream function and tried to make a load save type thing for a programm i am courently makeing. as far as i can tell the coding is correct but it isn't saveing or loading the file … |
|
First post; Very nice and interesting site. I checked the link for C/C++ books and i didn't see a book for beginners. What book do you recommend reading for a person that is new to programming and doesn't have any programming background. I am new and ready to learn. I … |
|
i teach a high school c++ course. i would like to use a window for user interface instead of dos console. could anyone provide me the basic code to display "hello world" in a window? and if possible a link to the code necessary to use window api for c++ … |
|
I am trying to write a phonebook program that uses a dat file to store the numbers (ex. in dat file--John Doe 5554445555). I have it to the point when the user keys "John" in, it will display the number. If the user keys in "John Doe", it will not … |
|
hi.. i'm pretty new with C++, so pls. bear with my question, simple as it may be. can anyone pls. tell me what this error mean: [I]syntax error before `<'[/I] i have a whole bunch of them when i try to compile.. if needed, i'll post up the codes. Thanks! |
|
I'm currently writing a game in DirectX without using the MFC structure. I am manually crating the window by including windows.h and manually creating the window by using windows functions. I am a bit confused when it comes to using strings. I would like to use the CString class, as … |
|
The following code is not performing correctly. It opens the username file but does not display the mark. [code]#include <cstdlib> //these commands are pre processors directive #include <fstream> //required for library function #include <iostream> #include <cstring> #include <string> using namespace std; int main() { cout << "Marking Program"<<endl; string username; … |
|
Write program that reads some information of 10 students (name [max 15] , level number , #of points , #of hours , GPA , student id ). These fields should be filled for each student by user except GPA. The GPA (max: 5) should be calculate it by function that … |
|
[SIZE=4][COLOR=DimGray]please I need your help inthis program because I do not under stand what does he want and I didn't under stand the array so please help me[/SIZE][/COLOR] Write a function named "eliminate_duplicates" that takes an array of integers in random order and eliminates all the duplicate integers in the … |
|
The following program executes without any errors, but the output is not what is expected. The code is correct down till the opening of the MarkScheme.txt file, but the student mark is not displayed on the screen, any thoughts [code]#include <cstdlib> #include <fstream> #include <iostream> #include <cstring> #include <string> using … |
|
Anybody could tell me what's wrong with the following code? It complaints: 13 C:\apps\Dev-Cpp\projects\14\14_1.cpp ISO C++ forbids defining types within return type Thanks in advance. [code]#include <iostream> #include <cstdlib> using namespace std; struct vector { double x; double y; friend ostream& operator<< (ostream&, vector); } ostream& operator<< (ostream& o, vector … |
|
Hello everyone. My instructor has asked me to write a program that accepts a string as input from a user and prints the string in reverse. I have to use a "for" loop to reverse the string. I am also suppose to allow the user to input more than one … |
The End.