Click here to Skip to main content
15,920,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Display Bitmap By adding resource VC++ 2003 MFC Pin
YUANGE30-Apr-07 21:27
YUANGE30-Apr-07 21:27 
AnswerRe: Display Bitmap By adding resource VC++ 2003 MFC Pin
Hamid_RT30-Apr-07 21:28
Hamid_RT30-Apr-07 21:28 
QuestionDynamic memory allocation revisited. Pin
C_Zealot30-Apr-07 18:04
C_Zealot30-Apr-07 18:04 
AnswerRe: Dynamic memory allocation revisited. Pin
David Nash30-Apr-07 18:38
David Nash30-Apr-07 18:38 
GeneralRe: Dynamic memory allocation revisited. Pin
C_Zealot30-Apr-07 19:34
C_Zealot30-Apr-07 19:34 
AnswerRe: Dynamic memory allocation revisited. Pin
Eytukan30-Apr-07 19:25
Eytukan30-Apr-07 19:25 
GeneralRe: Dynamic memory allocation revisited. Pin
C_Zealot30-Apr-07 19:37
C_Zealot30-Apr-07 19:37 
GeneralRe: Dynamic memory allocation revisited. Pin
Eytukan30-Apr-07 20:37
Eytukan30-Apr-07 20:37 
Are you supposed to stick to "C" ? or you have the option of using std::string s?
why not use them? or you need to go for linked lists. like :
typedef struct stringz
	{
		char c;
		struct stringz* next;
	}st;
	st* str =(st*)malloc(sizeof(stringz));
	st* head = str;
	char c;
	while(c=getch())
	{
		if(c==13)
			break;
		str->c=c;
		printf("%c",str->c);
		str->next=(st*)malloc(sizeof(stringz));
		str=str->next;
		
	}
	str->next=NULL;

//Print
	str =head;
	while(str->next!=NULL)
	{
		printf("%c",str->c);
		str=str->next;
	}

purely dynamic Roll eyes | :rolleyes: Roll eyes | :rolleyes: , hey but never mess up trying your own stringz!. If allowed, I suggest you go with std::string.





Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.

GeneralRe: Dynamic memory allocation revisited. Pin
C_Zealot30-Apr-07 20:39
C_Zealot30-Apr-07 20:39 
AnswerRe: Dynamic memory allocation revisited. Pin
John R. Shaw30-Apr-07 22:37
John R. Shaw30-Apr-07 22:37 
GeneralRe: Dynamic memory allocation revisited. Pin
C_Zealot30-Apr-07 22:40
C_Zealot30-Apr-07 22:40 
Questionscanf () loop question. Pin
C_Zealot30-Apr-07 17:24
C_Zealot30-Apr-07 17:24 
AnswerRe: scanf () loop question. Question withdrawn Pin
C_Zealot30-Apr-07 17:51
C_Zealot30-Apr-07 17:51 
GeneralRe: scanf () loop question. Question withdrawn Pin
Eytukan30-Apr-07 21:58
Eytukan30-Apr-07 21:58 
GeneralRe: scanf () loop question. Question withdrawn Pin
C_Zealot30-Apr-07 22:29
C_Zealot30-Apr-07 22:29 
GeneralRe: scanf () loop question. Question withdrawn Pin
James R. Twine1-May-07 2:34
James R. Twine1-May-07 2:34 
QuestionRe: scanf () loop question. Pin
David Crow1-May-07 2:16
David Crow1-May-07 2:16 
QuestionRe: scanf () loop question. Pin
James R. Twine1-May-07 2:40
James R. Twine1-May-07 2:40 
AnswerRe: scanf () loop question. Pin
David Crow1-May-07 2:52
David Crow1-May-07 2:52 
QuestionNeed some suggestions. C programming Pin
C_Zealot30-Apr-07 16:33
C_Zealot30-Apr-07 16:33 
AnswerRe: Need some suggestions. C programming Pin
C_Zealot30-Apr-07 16:37
C_Zealot30-Apr-07 16:37 
AnswerRe: Need some suggestions. C programming Pin
David Crow30-Apr-07 17:19
David Crow30-Apr-07 17:19 
GeneralRe: Need some suggestions. C programming Pin
C_Zealot30-Apr-07 17:21
C_Zealot30-Apr-07 17:21 
QuestionNot working Pin
dellthinker30-Apr-07 12:29
dellthinker30-Apr-07 12:29 
AnswerRe: Not working [modified] Pin
Mark Salsbery30-Apr-07 13:11
Mark Salsbery30-Apr-07 13:11 

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.