Thanks ....I managed to get my program working with append....
Type: Posts; User: Bones
Thanks ....I managed to get my program working with append....
thanks...but that doesn't work.....
All you have to do is declare teh function with the keyword friend infront of it....
class two; // needed for frifunc declaration
class one
{
private:
int data;...
Not sure how to use append???
I have to write a program that emulates the Unix cat command. The program accepts between 2 to 9 files from dos command line.
eg concat file 1 file 2 file3 ...... // concat being the name of my...
Thanks...thats what I thought...now just to give it a try...
Thanks also for the links....I'm sure they will help.
Cheers
I have to write a program that emulates the Unix cat command. The program accepts between 2 to 9 files from dos command line.
eg concat file 1 file 2 file3 ...... // concat being the name of my...
when you accept the value from the user use any of the following
cin.get(aString, 50 ) // accept a string up to 50 or '\n'
cin.get(astring,50,'$') // accept to 40 or '$' is found
There are a few things wrong with your program, but what are you trying to do?? I can't help you unless you tell me what you program should do....
format for one number at a time...
cout << setiosflags(ios::fixed) // fixed
<< setiosflags(ios::showpoint) // always show decimal
<< setprecision(2) // two decimal places
...
In the program given, I have to insert a destructor to the class that will delete all the links when a linklist object is destroyed. I also need a message to display in the destructor that the...
In my program I have to put a destructor in the class which will delete all the links when a linklist object is distroyed. I have to delete each link as it goes, displaying a message that the...
Ok....now I have to change it to an Array of 10...
* const int SIZE = 10;
String s[SIZE]= {
{"root:!:0:0::/:/bin/ksh"},
...
Thanks .... it all worked...
What I'm trying to do is pass a string from my derived class to my base class. A function called nextToken() should return a String object up to the delimiter(in this case ':').
This string ...
For one of my assignments we are given the following code...
#include <iostream>
#include <string>
#include <conio.h>
using namespace std;...
I have to Add to the Time class the conversion function for converting from a long (seconds 77777) to a Time object....I have no idea what to do...this is the code I have so far....
class...
Always the smallest thing can seem so great, we just don't see it at all.....
Thanks.....you were right.....my program runs perfectly.....
Cheers
I have no idea why my program won't work right.....I still can't compare the fractions.
Still won't convert from int to float ..... values end up being 0....
I have attached most of my program...
I am using a class called Fraction with this format...
class Fraction // the Fraction class has two parts
{
private:
int denom;
int...
In my code I have to define a class called Array, it simulates a dynamic array of integers and I also have to code a constructor. This all seems to work fine, but I also have to code a destructor...
While reading data from a file to be loaded into an array, if an error occurs ont he input....an error message should be displayed and the rest of the line should be flushed....and continue on with...