Guest User

Untitled

a guest
May 22nd, 2012
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. Vector of structs with dynamically allocated members
  2. typedef struct {
  3. WCHAR *str1;
  4. WCHAR *str2;
  5. DWORD SomeOtherStuff;
  6. } MYSTRUCT;
  7.  
  8. vector<MYSTRUCT> myvector;
  9.  
  10. std::wstring wide_string;
  11. some_win_api_call( wide_string.c_str() ); // sending a string to winapi
  12.  
  13. wide_string.reserve( 256 ); // allocate some space to receive a string
  14. get_string_from_winapi( &wide_string[0], wide_string.capacity() );
Advertisement
Add Comment
Please, Sign In to add comment