Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang Usage #11

Open
RongTsai4Git opened this issue Feb 11, 2022 · 2 comments
Open

Clang Usage #11

RongTsai4Git opened this issue Feb 11, 2022 · 2 comments
Labels

Comments

@RongTsai4Git
Copy link
Owner

No description provided.

@RongTsai4Git RongTsai4Git changed the title Clang Tech Clang Usage Feb 11, 2022
@RongTsai4Git
Copy link
Owner Author

取得struct A:value_1 size作為arrary宣告的size常數

char a[sizeof(((struct A*)0)->value_1)]

@RongTsai4Git
Copy link
Owner Author

printf變數字串長度顯示

printf("%.*s\n", 16, "Hello world");
printf("|%*s|\n", 16 , "Hello world");
Output:
|Hello world|
|     Hello world|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant