51,593 Topics

Member Avatar for
Member Avatar for MaxC

Hello all, what do you think the answer following question is? The cin.getline function: a) reads a fixed number of characters as a string into a character array. b) reads a line as a string into a character array. c) reads a string up to the first blank space. d) …

Member Avatar for azeembutt
0
285
Member Avatar for mehdy
Member Avatar for JoBe

Hello ladies and gents, Ive been reading about pointers abit and at there are two pieces of text in the book about pointers wich aren't clear to me, was wondering if any of you could enlighten me abit about them! :D [quote]Sometimes it's desired to clearly point out that a …

Member Avatar for JoBe
0
163
Member Avatar for jhdobbins

Our program got cut down from a .h and 2 .cpps to just one .h and one .cpp.... so trying to convert fucntions back to my .h I received tons of errors. Hopefully someone can help me get rid of most of these? please? I need to turn in the …

Member Avatar for Dave Sinkula
0
177
Member Avatar for Gink
Member Avatar for ContactGT

I have only just subscribed to this group, so if I am in the wrong place, can someone please point me to a more relevant group. We use MS Visual Studio C++ Version 6.0 along with Blue Sky RoboHELP HTML Edition. We have a 9 components in our application and …

Member Avatar for ContactGT
0
142
Member Avatar for csi_a_m

I need help adding the data in columns and rows of 10 in a 2d array. I got the rows added, but could someone please help out with how to sum the data in the columns. Please look at my code, and thanks in advance [code] #include <iostream> // I/O …

Member Avatar for csi_a_m
0
195
Member Avatar for finbar

Well lads im new here in fact this is my first post, i assume first of many. Im starting work placement soon and i have been told that i will have to complete a project in C++ where i have to create a directory tree for storing documents which will …

Member Avatar for Dave Sinkula
0
170
Member Avatar for j.kelly

I am relatively new to C++ and am a bit unsure why the following function doesn't work. [code] /********************************************************* * GetDate: Takes a string to be displayed to the user * and returns a CTime object. Returns NULL if an invalid * date is entered *********************************************************/ CTime GetDate(string requestString) { …

Member Avatar for j.kelly
0
146
Member Avatar for hopeolicious

Can someone help me to figure his out. I have to read in a file that contains employee names, numbers, payrates, and hours. Then I have to calculate the gross andsend everything to an output file. I keep getting this error message "employee.cpp" 69 lines, 1471 characters $ c++ employee.cpp …

Member Avatar for murschech
0
126
Member Avatar for jhdobbins

well... its me again with another project following the basics of the last one... heres my header file: [CODE] #ifndef SCHEDULE_H #define SCHEDULE_H #include<string> class schedule { public: // this section will display the heading for the output table void printHead (); //This function is used to calculate the totalgpa …

Member Avatar for jhdobbins
0
223
Member Avatar for arnie6

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 …

Member Avatar for Narue
0
114
Member Avatar for nickgallimore

Hi guys, I'm a recruiter working on behalf of a young, progressive UK-based company developing a hosted secure email solution (potentially set to knock MessageLabs off their perch.....), based around Linux, Apache, MySQL and PHP. They're based in Kent and are looking for a relatively junior (2 yrs' experience) Software …

0
36
Member Avatar for the b

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 …

Member Avatar for the b
0
170
Member Avatar for jeymine

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 …

Member Avatar for marinme
0
2K
Member Avatar for rafalkw

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 …

Member Avatar for Narue
0
156
Member Avatar for Purps

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 …

Member Avatar for Narue
0
247
Member Avatar for cap2361

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 …

Member Avatar for Narue
0
312
Member Avatar for jhdobbins

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 …

Member Avatar for jhdobbins
0
155
Member Avatar for Acidburn

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 …

Member Avatar for Narue
0
140
Member Avatar for gicio
Member Avatar for JoBe

;) 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 …

Member Avatar for Narue
0
646
Member Avatar for Acidburn

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; } …

Member Avatar for Narue
0
215
Member Avatar for sinrtb

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 …

Member Avatar for Narue
0
131
Member Avatar for sunandoghosh

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, …

Member Avatar for Narue
0
191
Member Avatar for Rose Aashii

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 …

Member Avatar for Narue
0
229
Member Avatar for Fasola

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 …

Member Avatar for Fasola
1
961
Member Avatar for riturajraina

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 …

Member Avatar for Narue
0
154
Member Avatar for r0berth1

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 …

Member Avatar for r0berth1
0
160
Member Avatar for niteowl44

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 …

Member Avatar for niteowl44
0
145
Member Avatar for DaveSS

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 …

Member Avatar for marinme
0
239
Member Avatar for evilsilver

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 …

Member Avatar for evilsilver
0
218
Member Avatar for mrlucio79

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 …

Member Avatar for Narue
0
145
Member Avatar for mikecoyner

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++ …

Member Avatar for Narue
0
212
Member Avatar for camduthie

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 …

Member Avatar for Narue
0
111
Member Avatar for ecua_frap

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!

Member Avatar for kc0arf
0
129
Member Avatar for jhammer

I am wondering if someone could tell me what tools I will need to compile and build and executable of Dev-C++ for Fedora Core 3 to install it and run it. I have never worked with Delphi source code and I would appreciate any help with the process and what …

Member Avatar for jhammer
0
179
Member Avatar for robert_sun

Can anybody help me on this problem: I am writing a simulation program with several files. In a header file, I declared e global variable in hope that all other files could use it. so i put down: #define size 100 int memory[size]; in the header file memory.h. However, there …

Member Avatar for Narue
0
133
Member Avatar for Mr Violent

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 …

Member Avatar for Narue
0
490
Member Avatar for jonnie83

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; …

Member Avatar for Narue
0
219
Member Avatar for some one

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 …

Member Avatar for Narue
0
208
Member Avatar for some one

[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 …

Member Avatar for some one
0
507
Member Avatar for jonnie83

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 …

Member Avatar for Narue
0
169
Member Avatar for banbangou

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 …

Member Avatar for quickhelp
0
180
Member Avatar for Starz20

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 …

Member Avatar for Narue
0
168
Member Avatar for Starz20

Hi, everyone. You may have probably heard this a hundred times, but I am new to programming and I am taking an intro to C++ class. I have a program that I have written, but I can't understand why it will not exit gracefully. This is what I have written, …

Member Avatar for Starz20
0
163
Member Avatar for some one

please where is the error in this code doesn't run [code] #include<iostream> #include<cstdlib> using namespace std; int main() { int ages[1000]; int size=1000; int i,a,b; for( i=0;i<size;i++) { ages[i]=rand(); for( a=1;a<size;a++) { for( b=size-1;b>=a;b--) { if(ages[b-1]<ages[b]) { i=ages[b-1]; ages[b-1]=ages[i]; ages[b]=i; } } } } cout<<ages[i]; return 0; } [/code] Code …

Member Avatar for some one
0
116
Member Avatar for Acidburn

Hello, as you well know I've got a hangman game produced, I now have the luxury of adding to the code since all my work is completed ...yay, well, I've decieded to take it a step further and draw out the hunged man! I have the drawing , its just …

Member Avatar for Acidburn
0
2K
Member Avatar for hopeolicious

how do I get my calculations like ex. I want to add up the average gallons used per mile for a car if the car went like 1450 miles and used 62 gallons of gas I dont want it to be a whole number i want it to be like …

Member Avatar for Dave Sinkula
0
179
Member Avatar for acidburns

:evil: The following C program is mainly written to work as an address book. I have written the code but the VC++ compiler shows four errors and I cant find them :rolleyes: . Can some one please help me find them..my assignment deadline line is on the 10th of this …

Member Avatar for acidburns
0
182

The End.