I'm trying to set getters and setters for an array- I am trying to right click on the variable to find an option to refactor it ( there seems no such option).I also tried to type in the "code editor" but none seem to be working. Can I please be helped?
Asked
Active
Viewed 491 times
0
-
1Like you said, "there seems to be no such option".. – Desmond Hume Aug 02 '12 at 15:09
-
1@user - You might 1) Consider why there are very few getters and setters in the C++ standard library 2) Read [Are get and set functions popular with C++ programmers?](http://stackoverflow.com/questions/737409/are-get-and-set-functions-popular-with-c-programmers?lq=1) – Bo Persson Aug 02 '12 at 16:07
-
[Pseudo-Classes and Quasi-Classes Confuse Object-Oriented Programming](http://www.idinews.com/quasiClass.pdf) – fredoverflow Aug 02 '12 at 16:57
1 Answers
3
This does not work for C++ projects in VS2010, it only works for C# projects.

Wes
- 296
- 2
- 4
-
-
along side I also wanted to know if we could have setters and getters for a CStringArray? – user1563551 Aug 02 '12 at 15:37
-
I don't understand what you mean. Are you saying you want to be able to get and set the underlying `char*`? If so then you can use the `Add()` function to a default constructed CStringArray to add data to it. To get the data use the `GetData()` function. See [CStringArray documentation](http://msdn.microsoft.com/en-us/library/0aaaacss(v=vs.80).aspx) for more info. – Wes Aug 03 '12 at 07:11