I am using Visual C++ version 6. From their documentation fstream supports only up to 2GB. I wonder if there is any way to get around this problem.
Type: Posts; User: dickyDick
I am using Visual C++ version 6. From their documentation fstream supports only up to 2GB. I wonder if there is any way to get around this problem.
I wonder if standard fstream supports file size over 4GB?
Oh! I understood your first message now. Thanx again.
Sorry for not being clear. What I meant was, if I instantiated 2 objects of MyMainClass, each object would have its separate "dumbClass" pointer. But I wish them to share the same pointer (that was...
Oh thanx Transformer for reminding me about static nuisance.
I intend MyMainClass to have only a single (global) pointer to an instance of DummyClass. How do I code this?
There are some typos. See my correction below:
// File: DummyClass.h
class DummyClass {
public:
void doNothing() {
}
};
I have the following 2 files:
// File: DummyClass.h
class DummyClass {
public:
void doNothing() {
}
};
// File: MyMain.cpp
I used to combine them even for non-template classes. A while ago, as I developed my program I encountered some problem as I included a header file (non-template class) in more than 1 cpp file....
I used to put my methods implementation together with class definition in the header file. I would like to separate them. The following are my new code:
// File: MyClass.h
#ifndef...
This one works! Moreover it is much compact. Thanx legend
Thanx
I originally coded that way, but I was thinking a user may erroneously instantiate
DummyClass<TestStruct<double>, int> myClas;
which of course results in error(s). So to keep error to the...
I use visual c++ version 6. There are many errors, but the first 2 are:
error C2954: template definitions cannot nest
error C2951: template declarations are only permitted at global or namespace...
your suggestion does not work.
Hi all,
I am having trouble with class definition with template. The following is a simple example:
template <class DataType>
struct TestStruct {
DataType key;
};