string strTest = "Hello"; has a size of 5 charTest[] = {'H', 'e', 'l', 'l', 'o'}; has a size of 5.
string strTest = "Hello";
charTest[] = {'H', 'e', 'l', 'l', 'o'};
What is the difference between string and char[]?
string
char[]
String is a class, char x[] is an array of characters. Character arrays can only store characters, and the class contains various functions in addition to storing, so you can use them if necessary.
547 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
706 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
546 Understanding How to Configure Google API Key
640 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
534 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.