× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



hi all,

i have a problem with a struct definition. here is my scenario.

//1. this program is spawned and is multithreaded
//main.c (use CRTCMOD to compile)

#define LEN 10

typedef struct
{
  char p1[SIZE];
  char p2[SIZE];
}PARAM;


main()
{
  PARAM t1_param;
  pthread_t t1;
..........
//set some value to t1_param......like
strcpy(t1_param.p1,"some_data");
pthread_create(&t1,NULL,t1_func,&t1_param);

}

//2. this program contains the function for thread t1 created in main.c
//t1.c (use CRTCMOD to compile)

void *t1_func(void *param)
{
  extern PARAM;
  char p1_t[10],p2_t[10];

  strcpy(p1_t,(PARAM *)(param->p1));
  printf(" %s\n",p1_t);

  ........
}

//3. now creat a program using modules from main.c and t1.c


while compiling t1.c i am getting error in the strcpy, error is

   40       |  strcpy(d_name,(PARAM *)(param->d_name));

   40     1 +  (__strcpy((d_name),((PARAM *)(param->d_name))));

===========>
..............................a................b................
*=ERROR===========> a - CZM0350 Syntax error.

*=ERROR===========> b - CZM0347 Syntax error: possible missing ';' or ','.


the variable names are different in the error snippet i have pasted but the
scenario is the same.

kindly advise.
-srikanth d


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.