|
I'm using VS 2005 Professional VC++ (NOT CLI)And I'm including the fstream header to write to a file. As follows:
#include fstream.h And receive the following error:Error 1 fatal error C1189: #error : ERROR: Use of C runtime library internal header file.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: I'm using VS 2005 Professional VC++
I wonder , how statement #include <fstream.h> is compiling in your case, it should be #include <fstream> .
|
|
|
|
|
Sorry I left out the <> in the previous thread....
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: Sorry I left out the <> in the previous thread
I was concerned about .h part of your include. Which is not needed.
|
|
|
|
|
If I leave the .h out I receive the following errors:
Error 4 error C2065: 'fstream' : undeclared identifier
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
What ? Actually, it should be other way round. You are using VS2k5, Isn't it ? Are all your include directories are pointing to correct version ?
|
|
|
|
|
don't you mean std::fstream?
|
|
|
|
|
Looks like a VS 2005 Issue, cause if I use VS 6, there are no errors..
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
I think, you have messed up with include directories setting.
VS2k5 is modified to C++ standards in better way.
Now for STL, Only #include <header> works instead of #include <header.h>
|
|
|
|
|
Ok, thank you I'll keep that in mind, but where would I get the correct header file versions for VS 2005 (if there is such a thing), I mean I have been for 3 weeks in austria snowboarding .... so maybe I'm a little bit rusty ... They say a long holiday makes ones "stupid" for a for while anyway..
Thanks for the help.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
I meant to say, make sure they are picked from Program Files\Microsoft Visual Studio 8\VC\crt\src .
|
|
|
|
|
O.K ... now I understand what your trying to say, cause I saw that in the folder mentioned in your previous thread, fstream does not have a .h extension.
Thank you.
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi,
There are some interesting articles here on CodeProject explaining how to make custom Message Boxes with colored text and background.
I was just wondering, why not just create a Dialog Box and add the necessary code for background and text color and use it as a Message Box.
I guess I am missing something about the Message Box concept.
Please can you explain?
Fortitudine Vincimus!
|
|
|
|
|
Tara14 wrote: was just wondering, why not just create a Dialog Box and add the necessary code for background and text color and use it as a Message Box.
I think custom message boxes you are talking about, does similar thing.
|
|
|
|
|
And now whats your problem?
|
|
|
|
|
No problem, Sir.
Just trying to learn!
Fortitudine Vincimus!
|
|
|
|
|
For learning very good and see www.codeguru.com about cusom message Box I think I saw an good article on the that site
|
|
|
|
|
hi! i want to know what are the basic reasons to crash the application?
is due to dangling pointer only or also have some other reasons?
My application is crashed after when i finished the file protection first time with DRM(Digital Rights Management ) add new file in my listview at second time .
Amit
|
|
|
|
|
It can be due to a lot of different reasons. The best to find your problem is to use your debugger.
|
|
|
|
|
can you please elborate where should i focus at the time of debugging?
Amit
|
|
|
|
|
Need to check pointer values basically.
Use call stack to determine source of crash.
|
|
|
|
|
it is in the watch ? or some where else .i am using visual stdio 2005.
and
second question how can i pass array of object as pass by reference in function.
give the example for secification for called fucntion, and calling function.
suppose i have once class X;
class X {
string l;
string y;
.
.
.
public foo(X& y[]) //is it ok ? or what should I write?
{
}
};
int main()
{
X x[25];
foo(x);
return 0;
}
|
|
|
|
|
You could be writing to a invalid memory location. This is one of the reasons why an application crashes most of the time. it's hard to tell without having a look at the source code.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Basic reason - developer error. Either the developer writing the application, or the developer writing the libraries used.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
In additional with members a null handle,pointers,and for example open a file that isnt exist and...
|
|
|
|