well i have to leave to turn it in now but the problem was the var's arnt being set by the user input and are just returning garbage.
Type: Posts; User: johnnyg
well i have to leave to turn it in now but the problem was the var's arnt being set by the user input and are just returning garbage.
they give me the same two errors
sorry -_-
your constructor gives me 2 errors:
.\Rectangle.cpp(4) : error C2572: 'Rectangle::Rectangle' : redefinition of default parameter : parameter 2
c:\documents and settings\johnnyg\my...
forget the loop any idea why the functions wont take the numbers and they are producing garbage?
made the change but its still an endless loop /sigh
tried it again after adding the ifndef and it compiles but.
the values enter by the user are not making it to the cpp of rectangle/cube. its producing garbage as the length and witdth and height....
i normally code that into all my headers but this was given out of the assignment sheet so i didnt and i coded those in look:
#ifndef CUBE_H
#define CUBE_H
class Cube : public Rectangle
{
...
checked it but still didnt fix it :(
nice that fixed error #2 but it still doesnt recogonize the base class
its not huge. ill post the remaining files
rectangle.cpp:
#include "Rectangle.h"
Rectangle::Rectangle(double length, double width)
{
length=0.0;
width=0.0;
i tried that in the cube.h and it caused 11 more errors... the class i was given by my instructor i thought it was right but...i dono im out of ideas
i got a project due tomorrow dealing with inheritence and i seem to have hit a brick wall. the errors are:
c:\documents and settings\johnnyg\my documents\visual studio 2005\projects\project...
its like
friend operator+ ();?
hi im learning about overloading operators in my class and i dont really understand it. anyways i got an assignment to overload the + operator so i can add two strings togther into a third string and...
project is finished thanks for the help
calling the function the first time updates the total number of employees of that kind and calculates the weekly salary
the setw(5) was suppose to creat a space inbetween the text
yea i know...
thanks for the quick responses and as for the functions being called twice... the function returns a number andim calling it the 2nd time just to print that number
also after trying that advice i...
im reading in from a txt file that looks like this:
4 6.75 120 4444
1 1200.00 1111
3 10000.00 3333
2 12.50 50 2222
-1
and bassically im trying to just read in one number at a time however im...
thank you that worked great i really aprciate it
hi i've never posted here before but ive got a problem and none of my friends could help me figure it out. basically i have a variable called fileloc, its a string entered by the user. my problem...