After watching the machine learning course today, I changed to Learn C language for a while. It was also the first time I encountered the strcat function, the string concatenation function. Its general form is strcat (character array 1, character array 2). The function concatenates the strings of two character arrays, attaches string 2 to the end of string 1, and places the result in character array 1. The function call returns a function value — the address of character array 1. Such as:
#include<stdio.h>
int main()
{
char str1[30] = {"People's Republic of "};
char str2[] = {"China"};
printf("%s",strcat(str1,str2));
return 0;
}
Output code error:
In function 'main':
[Warning] incompatible implicit declaration of built-in function 'strcat'
Baidu once reason, little added header file
#include<stdlib.h>
#include<string.h>
After adding, the program output is normal:
Read More:
- The built-in filter function in Excel can’t contain all the items
- Default constructor cannot handle exception type FileNotFoundException thrown by implicit super cons
- C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat
- PHP & nbsp; built in server array
- error: a label can only be part of a statement and a declaration is not a statement (How to Fix)
- Idea | identify non self built webapp folder
- invalid method declaration
- Windows 8.1 – Fix This app can’t open for Built-in Administrator account
- How to solve the problem of requirements check failed for JDK 8 when Cordova 9.0 is built
- error: declaration may not appear after executable statement in block
- C language error: expected declaration or statement at end of input
- Yard error: found incompatible module
- IOS warning – this block declaration is not a prototype
- “Undeclared identifier” still reported in declaration header file
- [Vue warn]: Do not use built-in or reserved HTML elements as component id: article
- ADB:INSTALL_ FAILED_ UPDATE_ Incompatible [solved]
- error: expected declaration or statement at end of input
- Pycharm: cann‘t find declaration to go
- Golang timer function executes a function every few minutes
- Datanode startup failed with an error: incompatible clusterids