Click here to Skip to main content
15,928,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to open file Pin
Goh Hui Beng20-Feb-04 5:20
Goh Hui Beng20-Feb-04 5:20 
GeneralRe: how to open file Pin
rw10420-Feb-04 5:44
rw10420-Feb-04 5:44 
GeneralRe: how to open file Pin
Goh Hui Beng21-Feb-04 16:22
Goh Hui Beng21-Feb-04 16:22 
Generalvector<CString> *pvecString ?? :confused: Pin
Nirav Doshi19-Feb-04 23:30
Nirav Doshi19-Feb-04 23:30 
GeneralRe: vector<CString> *pvecString ?? :confused: Pin
Andrew Walker19-Feb-04 23:34
Andrew Walker19-Feb-04 23:34 
GeneralRe: vector<CString> *pvecString ?? :confused: Pin
Nirav Doshi19-Feb-04 23:43
Nirav Doshi19-Feb-04 23:43 
GeneralRe: vector<CString> *pvecString ?? :confused: Pin
Henrik Stuart20-Feb-04 0:03
Henrik Stuart20-Feb-04 0:03 
GeneralRe: vector<CString> *pvecString ?? :confused: Pin
Nirav Doshi20-Feb-04 1:52
Nirav Doshi20-Feb-04 1:52 
Thanks Henrik for your reply!

Henrik Stuart wrote:
First line you're trying to assign a std::vector<t> to a std::vector<t>*, which obviously fails, and should fail unless something really fishy is at work here. The correct approach would be to do: *g_pvecStrings = vecStrings; presuming g_pvecStrings != 0.


The *g_pvecStrings = vecStrings; doesn't work too! Frown | :(

Henrik Stuart wrote:
An even more correct approach would be an application redesign, but that's probably just the C++ purist in me talking.

Thanks for this point! My basic purpose is to call a global function which is going to fill the vector with strings. The filled vector is to be used in two of my class member functions. So to pass the data between the class member functions and the global functions I was doing this.

So, I had the global pointer to a vector, which was to point to a vector which will be allocated on the stack within my member function. From within the SAME function I was releasing and making the g_pvecStrings = NULL;

Please suggest the right way to get this going!

Thanks!

* Don't wish it was easier, wish you were better! *
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
John M. Drescher20-Feb-04 2:44
John M. Drescher20-Feb-04 2:44 
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
Nirav Doshi20-Feb-04 3:51
Nirav Doshi20-Feb-04 3:51 
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
Tim Smith20-Feb-04 4:37
Tim Smith20-Feb-04 4:37 
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
Robert A. T. Káldy20-Feb-04 6:52
Robert A. T. Káldy20-Feb-04 6:52 
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
Nirav Doshi20-Feb-04 7:24
Nirav Doshi20-Feb-04 7:24 
GeneralRe: vector&lt;CString&gt; *pvecString ?? :confused: Pin
John M. Drescher24-Feb-04 16:15
John M. Drescher24-Feb-04 16:15 
GeneralProblem with jpg Pin
Jay.Jay19-Feb-04 22:47
Jay.Jay19-Feb-04 22:47 
Generalassembly and c++ code problem please help Pin
dj_felix19-Feb-04 22:12
dj_felix19-Feb-04 22:12 
GeneralRe: assembly and c++ code problem please help Pin
Maxwell Chen19-Feb-04 22:23
Maxwell Chen19-Feb-04 22:23 
GeneralRe: assembly and c++ code problem please help Pin
Anonymous19-Feb-04 22:37
Anonymous19-Feb-04 22:37 
GeneralRe: assembly and c++ code problem please help Pin
Maxwell Chen19-Feb-04 22:49
Maxwell Chen19-Feb-04 22:49 
GeneralRe: assembly and c++ code problem please help Pin
Anonymous19-Feb-04 23:37
Anonymous19-Feb-04 23:37 
GeneralRe: assembly and c++ code problem please help Pin
John M. Drescher20-Feb-04 2:46
John M. Drescher20-Feb-04 2:46 
GeneralRe: assembly and c++ code problem please help Pin
Alexander M.,20-Feb-04 9:27
Alexander M.,20-Feb-04 9:27 
GeneralRe: assembly and c++ code problem please help Pin
John M. Drescher20-Feb-04 9:48
John M. Drescher20-Feb-04 9:48 
GeneralProblem about CryptSignMessage Pin
Roy Zuo19-Feb-04 21:28
Roy Zuo19-Feb-04 21:28 
Questionwhat is difference between copy constructor and assignment operator Pin
Rajesh match19-Feb-04 21:27
Rajesh match19-Feb-04 21:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.