Link to home
Start Free TrialLog in
Avatar of Maximka2000
Maximka2000

asked on

Basic question about Srings in C

I have some compile error here

#include <stdio.h>
#include <string.h>
void main(void)
{
  char str[20];
  memcpy(str, "aaaaa" + "bbbbb\0",10);
  printf("here is the concated line %s",str);
 
}

error c2110 :cannot add two pointers

I programing in some environment(AS/400) and I have to port from Win32 this line :
memcpy(str, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",132);
the problem is that length of line in this environment limitted to 80 chars, so what have I do ?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of zebada
zebada

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial