Click here to Skip to main content
16,011,680 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Nooby would like to know how to make a button send Ctrl 1 Pin
ThatsAlok26-Feb-08 20:12
ThatsAlok26-Feb-08 20:12 
GeneralRe: Nooby would like to know how to make a button send Ctrl 1 Pin
doorprize2-Mar-08 17:46
doorprize2-Mar-08 17:46 
Generalspace in string Pin
George_George26-Feb-08 15:23
George_George26-Feb-08 15:23 
GeneralRe: space in string Pin
User 58385226-Feb-08 15:49
User 58385226-Feb-08 15:49 
GeneralRe: space in string Pin
George_George26-Feb-08 16:01
George_George26-Feb-08 16:01 
GeneralRe: space in string Pin
User 58385226-Feb-08 16:11
User 58385226-Feb-08 16:11 
GeneralRe: space in string Pin
George_George26-Feb-08 16:26
George_George26-Feb-08 16:26 
GeneralRe: space in string Pin
User 58385226-Feb-08 16:39
User 58385226-Feb-08 16:39 
There is only one stack. It isued for storing objects as well as holding various memory addresses required for implementing function calls. The stack is a single FILO (first in, last out) data structure.

If you do this

void foo()
{
string& str = goo();
}

string& goo()
{
string myString("George is cool");
return myString;
}

it will fail (some compilers will give a warning)


The reason is that when goo() returns the stack pointer goes back to where it was before the call to goo and anything allocated on the stack by goo will be gone. This will also be true even if you assign a long string and the string class puts it on the heap, the reason is that myString is on the stack and its pointer to the heap will be lost.
GeneralRe: space in string Pin
George_George26-Feb-08 16:46
George_George26-Feb-08 16:46 
GeneralRe: space in string Pin
User 58385226-Feb-08 16:56
User 58385226-Feb-08 16:56 
GeneralRe: space in string Pin
George_George26-Feb-08 17:31
George_George26-Feb-08 17:31 
GeneralRe: space in string Pin
David Crow26-Feb-08 17:16
David Crow26-Feb-08 17:16 
GeneralRe: space in string Pin
George_George26-Feb-08 17:32
George_George26-Feb-08 17:32 
Generalsilently installing .reg file Pin
act_x26-Feb-08 10:58
act_x26-Feb-08 10:58 
GeneralRe: silently installing .reg file Pin
Dave Calkins26-Feb-08 16:16
Dave Calkins26-Feb-08 16:16 
GeneralRe: silently installing .reg file Pin
ThatsAlok27-Feb-08 16:10
ThatsAlok27-Feb-08 16:10 
QuestionIs this book on the standard library worth it? Pin
markt26-Feb-08 5:53
markt26-Feb-08 5:53 
AnswerRe: Is this book on the standard library worth it? Pin
Dave Calkins26-Feb-08 6:17
Dave Calkins26-Feb-08 6:17 
AnswerRe: Is this book on the standard library worth it? Pin
Nemanja Trifunovic26-Feb-08 7:21
Nemanja Trifunovic26-Feb-08 7:21 
GeneralRe: Is this book on the standard library worth it? Pin
markt26-Feb-08 11:29
markt26-Feb-08 11:29 
GeneralRe: Is this book on the standard library worth it? Pin
User 58385226-Feb-08 15:50
User 58385226-Feb-08 15:50 
GeneralProblems receiving highspeed data using CAsyncSocket::OnReceive() Pin
97C5ENVY26-Feb-08 4:51
97C5ENVY26-Feb-08 4:51 
GeneralRe: Problems receiving highspeed data using CAsyncSocket::OnReceive() Pin
Mark Salsbery26-Feb-08 5:23
Mark Salsbery26-Feb-08 5:23 
GeneralRe: Problems receiving highspeed data using CAsyncSocket::OnReceive() Pin
97C5ENVY26-Feb-08 7:27
97C5ENVY26-Feb-08 7:27 
GeneralRe: Problems receiving highspeed data using CAsyncSocket::OnReceive() Pin
led mike26-Feb-08 7:33
led mike26-Feb-08 7:33 

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.