P
puzzlecracker
Fixed font - Proportional font
string initilization WHY?
All 2 messages in topic - view as tree
puzzlecracker Jan 29, 10:47 pm show options
Newsgroups: comp.lang.c
From: "puzzlecracker" <[email protected]> - Find messages by this
author
Date: 29 Jan 2005 22:47:59 -0800
Local: Sat, Jan 29 2005 10:47 pm
Subject: string initilization WHY?
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse
Why would this work? - and it does! any thoughts?
#include<iostream>
using namespace std;
void init(char **str){ *str="Awesome"; }
main(){
char * str;
init(&str);
cout<<str<<endl;
}
string initilization WHY?
All 2 messages in topic - view as tree
puzzlecracker Jan 29, 10:47 pm show options
Newsgroups: comp.lang.c
From: "puzzlecracker" <[email protected]> - Find messages by this
author
Date: 29 Jan 2005 22:47:59 -0800
Local: Sat, Jan 29 2005 10:47 pm
Subject: string initilization WHY?
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse
Why would this work? - and it does! any thoughts?
#include<iostream>
using namespace std;
void init(char **str){ *str="Awesome"; }
main(){
char * str;
init(&str);
cout<<str<<endl;
}