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: 103
Registered: January 2011
Location: hyd
Senior 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: 68625
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: Thu Mar 28 12:18:03 CDT 2024