Search:
Type: Posts; User: halmark6Z
Search:
Search took 0.03 seconds.
-
January 2nd, 2004, 05:05 PM
now I got it. If one could only know when temporary objects are
created by the system?
-
January 2nd, 2004, 01:38 PM
Hi,
I was reading Thinking in C++ by Bruce Eckel and I got stuck with this example:
class X {
int i;
public:
X(int ii = 0);
-
December 31st, 2003, 04:47 AM
Hi,
I`m reading chars to a char *buffer
ifstream datafile;
int length;
char * buffer;
-
December 6th, 2003, 09:57 AM
Thanks! Got it working.
Now it got intresting, I tried
to run a small Test program.
class House
{
private:
-
December 6th, 2003, 05:06 AM
thanks for your help!
Though, now the compiler says:
FileUtils.cpp: In member function `void FileUtils::loadAnimals(const std::vector<Animal*, std::allocator<Animal*> >&, const char*)':...
-
December 5th, 2003, 07:10 PM
well, it worked and it didn`t :confused:
First I did as you suggested. But the compiler complained
-> I removed the word const from the function declaration
and it worked.
Doesn`t the const...
-
December 5th, 2003, 06:51 PM
Hi again!
I`ve puzzled the next one rather long, and I´m pretty stuck with it:
void loadAnimals(const vector<Animal*> *animals, const char* filename)
{
...
...
-
December 5th, 2003, 04:33 PM
ah, got it!
Those virtual functios should not be in the cpp file ... works fine!
Thanks again !!
-
December 5th, 2003, 04:25 PM
ah, one error message removed!
But it did not affect to the rest...
-
December 5th, 2003, 04:08 PM
Hi again,
I tried, but no luck :(
#ifndef INCLUDED_ANIMAL_HPP
#define INCLUDED_ANIMAL_HPP
-
December 5th, 2003, 03:45 PM
As I started to use C++ this tuesday, I did not know anything about it. For now, I tought I should do all the code like:
// file: Foo.cpp
#ifndef INCLUDED_FOO
#define INCLUDED_FOO
...
-
December 5th, 2003, 11:34 AM
jfaust
you saved my day!
<Animal*> did the trick :p
thanks for you too usmarine , destructors fixed.
ok, let`s see if I can spell it right:
-
December 5th, 2003, 11:18 AM
I forgot to ask, did you observe any other / general flaws in the Customer - RegularCustomer - PlatinumCustomer classes ( in addition to destructor) ?
-
December 5th, 2003, 11:15 AM
sliced?
I`ll fix my vectors to <Animal*>
and I`ll fix my destructors
ps. I started using C++ last tuesday, so I`m not yet a C++ pro
altough I have a rather long Java/Assembly:)...
-
December 5th, 2003, 11:08 AM
um, if I ask too stupid questions, just ignore. Anyway, I`m grateful for any help!
-
December 5th, 2003, 10:25 AM
//////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_CUSTOMER
#define INCLUDED_CUSTOMER
#include <string>
#include <fstream>
using namespace std;
-
December 5th, 2003, 07:45 AM
you are right, the Aniamal code worked. I`ll format my code
and put it here ... just a moment ...
-
December 5th, 2003, 05:07 AM
yes, they are all implemented ( the animal example was just a similar case to my real implementation )
in my real code, I put "Animal" references to a vector, but the compiler says:
...
-
December 5th, 2003, 04:27 AM
Ok, since I`m from Java background I tried to do the following
like in the Java, at first. Consider the Java code:
public abstract class Animal
{
public abstract void makeVoice(); // no...
-
December 4th, 2003, 06:22 PM
fixed...I see light in the horizon....
inheritance bug.
-
December 4th, 2003, 05:00 PM
I tried, it complains about the same thing:
gxx -o Test.exe Test.o DerivedSimpleClass.o SimpleClass.o
gxx -o Test.exe SimpleClass.o DerivedSimpleClass.o Test.o
gxx -o Test.exe...
-
December 4th, 2003, 04:00 PM
Finally, I got it working. Thank for helping, really!
I used gxx instead of g++:p
Well, I tried a bit further.
I made a simple class to do set/get stuff.
Then I created a file with a main...
-
December 4th, 2003, 11:29 AM
I just tried the following
C:\projects\test>gcc -lstdc++ -o Test.exe Test.o
and with this
-Lc:\djgpp\lib\
-
December 4th, 2003, 10:48 AM
I mean, with -l or -L flag. But what to include?
-
December 4th, 2003, 09:29 AM
ummmm... I`m lost. I`v tried to search to manual
for an answer...but no,
as far I understand, I have to inform the linker about
some libraries. But I don`t know what are the names of
those and...
|
Click Here to Expand Forum to Full Width
|