cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
invalid initialization
invalid initialization
Oct 23, 2011 at 1:30pm UTC
littlefoot
(1)
Hi,
I am working in IBM Linux.
When i am running the following statement its giving me an "invalid initialization" error.
fpos_t file_curr_pos=0;
when i run this statement in hpux it doesn't gave any error.
Please help me how to solve this.
Thanks in advance.
Oct 23, 2011 at 1:41pm UTC
quirkyusername
(792)
I don't know what type of object fpos_t is but from googling it I found this
http://www.cplusplus.com/reference/clibrary/cstdio/fpos_t/
fpos_t objects are usually created by a call to fgetpos, which returns a reference to an object of this type.
that could explain it
Last edited on
Oct 23, 2011 at 1:41pm UTC
Oct 23, 2011 at 1:43pm UTC
Moschops
(7244)
fpos_t is not meant to have a value explicitly assigned by you. It is intended to have the value set by the fgetpos function. Don't give it a value yourself - use fgetpos.
Topic archived. No new replies allowed.