Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 08:42 AM |
char szClassName[ ] = "App";
wats that [ ] for? |
|
|
| Report Abuse |
|
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 08:43 AM |
| link me to a page explaining this pls? |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2015 09:01 AM |
oh wait idk what it does XD brb |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 09:02 AM |
:c
a link to a page explainin dis pls? |
|
|
| Report Abuse |
|
|
|
| 23 Sep 2015 09:13 AM |
| cplusplus.com/doc/tutorial/ntcs/ |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
| |
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 09:26 AM |
they explain so complicated
can anybody explain it pls? (angles said he was mistaken or something so... :P) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Sep 2015 09:48 AM |
It just means create an array without a specific size, the compiler will fill it in for you and pretty much do:
char szClassName[4] = "App";
|
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 10:15 AM |
but
char szClassName[] = "App";
is setting a string
not an array e.e |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
|
| 23 Sep 2015 10:33 AM |
so this what i know:
char szClassName[] = "App";
creates a table which the compiler will fill in how many indexes there are by leaving [] empty,
but i dont get why it sets a string, this isnt a string variable, and how does the table look like? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Sep 2015 11:08 AM |
| A string IS an array, stop thinking with a high level rationale or you'll never understand basic low level concepts. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Sep 2015 11:10 AM |
It's pretty much equiv. to: char szClassName[4] = {'A', 'P', 'P', 0}; |
|
|
| Report Abuse |
|
|
Fedorakid
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|