Home » Developer & Programmer » Precompilers, OCI & OCCI » pro*c Error "Invalid initialization" (Precompile 10.2.0 IBM LINUX)
pro*c Error "Invalid initialization" [message #528192] Sat, 22 October 2011 21:52 Go to next message
9390512774
Messages: 97
Registered: January 2011
Location: hyd
Member
Hi Experts,
I wrote a pro*c program. i am providing you a sample program which a similar one to my prog. but its not a exact test case.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
EXEC SQL BEGIN DECLARE SECTION;
......................
...................
char userid='/';
EXEC SQL END DECLARE SECTION;
int main()
{
fpos_t file_pos;
fpos_t file_current_pos=0;/*initialy its for pointing begging of file*/
...............
................
EXEC SQL CONNECT :userid;
......................
....................
} 

i am executing this through a make file which will create an executable code.
when i am trying to compile it its giving me an error "invalid initialization" in line "fpos_t file_current_pos=0;" when i remove "=0" then its successfully generates executable.
but i need it to be initialized to begging of file. is there any way of declaring & initializing the fpos_t variable.

Thanks in advance.
Re: pro*c Error "Invalid initialization" [message #528199 is a reply to message #528192] Sun, 23 October 2011 01:35 Go to previous message
Michel Cadot
Messages: 59147
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This question bears no real connection with Oracle.
Please find a more appropriate forum.
The topic is locked.
If I'm wrong, please, PM me (or report this message to a moderator, explain why you think it should be unlocked and it might be done).

Have a look at the definition of file_current_pos type.

Regards
Michel
Previous Topic: Performance issue with EXEC SQL OPTION SET
Next Topic: OCIEnvcreate returns -1
Goto Forum:
  


Current Time: Sun Sep 21 03:07:13 CDT 2014

Total time taken to generate the page: 0.23416 seconds