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, "aaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaa aaaaaaabbb bbbbbbbbbb bbbbbbbbbb bbbbbbbbbb b",132);
the problem is that length of line in this environment limitted to 80 chars, so what have I do ?
Thanks.
#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, "aaaaaaaaaaaaaaaaaaaaaaaaa
the problem is that length of line in this environment limitted to 80 chars, so what have I do ?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.