Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Does anyone know good site to study Pro*C/C++?
hi everyone!!
I'm studying programming using Pro*C/C++, but i can't compile a file
that i made..
i don't know what problem is..
Errors are follows..
Error at line 1, column 10 in file test2.pc
#include <iostream.h>
.........1
PCC-S-02015, unable to open include file
and then if i execute this program.. the error is occured like that Segmentation Fault (core dumped)
Ok.. I need your help..
T.x
following is my source code..
#include <iostream.h>
#include <stdio.h>
#include <sqlca.h>
#include <string.h>
#include <stdlib.h>
class link { // Base class is a simpleemployee
// char equip code[40]; char equip name[30]; char ipaddr[15]; char community[20]; char node code[5]; int *if index; char port name[79]; char speed[2]; char cust name[30]; // char use type[2]; link(char *equip name,char *ipaddr,char *community,char*node code,int *if index,char *port
link::link(char *equip name,char *ipaddr,char *community,char
*node code,int *if index,char *port na
me,char *speed,char *cust name)
{
strcpy(this->equip name, equip name); strcpy(this->ipaddr, ipaddr); strcpy(this->community, community); strcpy(this->node code, node code);
strcpy(this->port name, port name); strcpy(this->speed, speed); strcpy(this->cust name, cust name);
void print(char *equip name,char *ipaddr,char *community,char
*node code,int *if index,char *port na
me,char *speed,char *cust name)
{
link
target(equip name,ipaddr,community,node code,if index,port name,speed,cus
t name);
cout << equip name << " " << ipaddr << " " << community << " "
<< node code << " " << if ind
ex << " " << port name << " " << speed << " " << cust name << "\n";
}
void main()
{
exec sql begin declare section;
char *uid = "traffic/traffic";
// char equip code[40];
char equip name[30];
char ipaddr[15];
char community[20];
char node code[5];
int *if index;
char port name[79];
char speed[2];
char cust name[30];
// char use type[2];
exec sql end declare section;
exec sql whenever sqlerror goto error;
exec sql connect :uid;
exec sql declare c cursor for
select
equip name,ipaddr,community,node code,if index,port name,speed,cust name
from link where
use type=4 and node code='CENTER';
exec sql open c;
exec sql whenever not found do break;
while(1)
{
exec sql fetch c into
:equip name,:ipaddr,:community,:node code,:if index,:port name,:speed,:cu
st name;
print(equip name,ipaddr,community,node code,if index,port name,speed,cust
name);
}
exec sql close c;
exec sql rollback release;
exit(0);
error:
cout << endl << sqlca.sqlerrm.sqlerrmc << endl;
exec sql rollback release;
exit(1);
}
--Received on Wed Mar 07 2001 - 20:29:30 CST
![]() |
![]() |