It's not very often that I need help with technical issues, but this is definitely one of those situations.
I'm a VB type that has just spent his first couple of hours with C++. Unbelievable, I'm having the steepest learning curve with Strings. Unfortunately, I'm not just jacking around, but have a project that requires me to develop a C++ DLL.
Could someone offer some insight on the declaration and use of strings? Even what you can and cannot do when passing various strings to function initiators? I know the very basics of C vs. C++ strings and narrow and wide strings. Every C++ string tutorial I've looked at neglects to mention the various permutations of syntax, e.g. '*' (wchar_t*)wstrvariable and so on.
Here's some code that passes wstrings around to functions. Of course, the compiler is mad at me . I've tried to model my actions around existing code I've reviewed, but I'm still missing the big picture.
Function A - queryregforaffirm is being called and I'm getting an error on the second Function B initiator. There are other string related issues, but maybe this will serve as a good test case to get me on the right track.
...
iRegQuery = queryregforaffirm(RegRootKey, L"TGroup" + i + L"AlphaLReq");
...
Function B
LONG queryregforaffirm(RegRootKey, wchar_t* wstrRegName)
Thanks in advance!
Ned
I'm a VB type that has just spent his first couple of hours with C++. Unbelievable, I'm having the steepest learning curve with Strings. Unfortunately, I'm not just jacking around, but have a project that requires me to develop a C++ DLL.
Could someone offer some insight on the declaration and use of strings? Even what you can and cannot do when passing various strings to function initiators? I know the very basics of C vs. C++ strings and narrow and wide strings. Every C++ string tutorial I've looked at neglects to mention the various permutations of syntax, e.g. '*' (wchar_t*)wstrvariable and so on.
Here's some code that passes wstrings around to functions. Of course, the compiler is mad at me . I've tried to model my actions around existing code I've reviewed, but I'm still missing the big picture.
Function A - queryregforaffirm is being called and I'm getting an error on the second Function B initiator. There are other string related issues, but maybe this will serve as a good test case to get me on the right track.
...
iRegQuery = queryregforaffirm(RegRootKey, L"TGroup" + i + L"AlphaLReq");
...
Function B
LONG queryregforaffirm(RegRootKey, wchar_t* wstrRegName)
Thanks in advance!
Ned