Click here to Skip to main content
15,914,014 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: updating user32.lib Pin
David Crow11-May-05 3:21
David Crow11-May-05 3:21 
GeneralRe: updating user32.lib Pin
Kharfax11-May-05 3:30
Kharfax11-May-05 3:30 
GeneralRe: updating user32.lib Pin
Kharfax11-May-05 3:44
Kharfax11-May-05 3:44 
GeneralRe: updating user32.lib Pin
David Crow11-May-05 3:50
David Crow11-May-05 3:50 
Generalerror C2664: 'TextOutW' : cannot convert parameter 4 from 'char [10]' to 'const unsigned short *' Pin
zeyun11-May-05 2:40
zeyun11-May-05 2:40 
GeneralRe: error C2664: 'TextOutW' : cannot convert parameter 4 from 'char [10]' to 'const unsigned short *' Pin
RChin11-May-05 2:56
RChin11-May-05 2:56 
GeneralCopy Constructors Pin
bhangie11-May-05 2:38
bhangie11-May-05 2:38 
GeneralRe: Copy Constructors Pin
Bob Stanneveld11-May-05 3:09
Bob Stanneveld11-May-05 3:09 
Hello,

Your subject is the answer! Just write a copy constructor that copies all elements of the container and the string..

Example code:
<br />
CShop::CShop(const CShop& ShopToCopy)<br />
{<br />
m_pEmployee = new CEmployeeContainer();<br />
for( CEmployeeContainer::iterator i = ShopToCopy->m_pEmployee->begin(); <br />
i != ShopToCopy->m_pEmployee->end(); i++ )<br />
{<br />
m_pEmployee->insert(i);<br />
}<br />
<br />
m_strShopName = new char[strlen(ShopToCopy->m_strShopName) + 1];<br />
strcpy(m_strShopName, ShopToCopy->m_strShopName);<br />
}<br />


Hope this helps

I also got the blogging virus..[^]
GeneralRe: Copy Constructors Pin
David Crow11-May-05 3:20
David Crow11-May-05 3:20 
GeneralRe: Copy Constructors Pin
bhangie11-May-05 3:30
bhangie11-May-05 3:30 
GeneralToolTip Pin
javi_jmc11-May-05 2:20
javi_jmc11-May-05 2:20 
GeneralRe: ToolTip Pin
Max Santos11-May-05 3:15
Max Santos11-May-05 3:15 
GeneralMaximum Number of Controls Pin
Ritheesh V Shetty11-May-05 2:16
Ritheesh V Shetty11-May-05 2:16 
GeneralRe: Maximum Number of Controls Pin
David Crow11-May-05 3:26
David Crow11-May-05 3:26 
QuestionServer not receiving notifications of network events for a socket? Pin
arrya_amit11-May-05 1:17
arrya_amit11-May-05 1:17 
AnswerRe: Server not receiving notifications of network events for a socket? Pin
arrya_amit11-May-05 20:43
arrya_amit11-May-05 20:43 
Questionhow to use apihook to hide a file or directory? Pin
sharkmouse11-May-05 0:43
sharkmouse11-May-05 0:43 
AnswerRe: how to use apihook to hide a file or directory? Pin
David Crow11-May-05 3:29
David Crow11-May-05 3:29 
GeneralWin32SDK Printer Pin
Rolandjr11-May-05 0:37
Rolandjr11-May-05 0:37 
GeneralRe: Win32SDK Printer Pin
Anonymous11-May-05 1:01
Anonymous11-May-05 1:01 
GeneralStart program hidden on startup Pin
ddmcr11-May-05 0:34
ddmcr11-May-05 0:34 
GeneralRe: Start program hidden on startup Pin
ThatsAlok11-May-05 0:40
ThatsAlok11-May-05 0:40 
GeneralRe: Start program hidden on startup Pin
ddmcr11-May-05 0:50
ddmcr11-May-05 0:50 
GeneralRe: Start program hidden on startup Pin
ThatsAlok11-May-05 1:01
ThatsAlok11-May-05 1:01 
GeneralRe: Start program hidden on startup Pin
ddmcr11-May-05 1:05
ddmcr11-May-05 1:05 

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.