mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2024-11-24 11:25:30 +00:00
Create ansic_functions.c
This commit is contained in:
parent
ed170d287a
commit
fe6be83b1d
26
strings/ansic_functions.c
Normal file
26
strings/ansic_functions.c
Normal file
@ -0,0 +1,26 @@
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#define STR_EQUAL 0
|
||||
|
||||
int wmain(void) {
|
||||
|
||||
wchar_t str1[] = L"There are 15 pines";
|
||||
|
||||
wprintf(L"The length of the string is %lld characters\n", wcslen(str1));
|
||||
|
||||
wchar_t buf[20];
|
||||
wcscpy(buf, L"Wuthering");
|
||||
wcscat(buf, L" heights\n");
|
||||
wprintf(buf);
|
||||
|
||||
if (wcscmp(L"rain", L"rainy")== STR_EQUAL) {
|
||||
|
||||
wprintf(L"rain and rainy are equal strings\n");
|
||||
} else {
|
||||
|
||||
wprintf(L"rain and rainy are not equal strings\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user