Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: constructor failed??? Pin
CPallini4-Jun-08 21:36
mveCPallini4-Jun-08 21:36 
GeneralRe: constructor failed??? Pin
Hamid_RT4-Jun-08 23:52
Hamid_RT4-Jun-08 23:52 
GeneralRe: constructor failed??? Pin
CPallini4-Jun-08 23:55
mveCPallini4-Jun-08 23:55 
AnswerRe: constructor failed??? Pin
CPallini4-Jun-08 21:16
mveCPallini4-Jun-08 21:16 
GeneralRe: constructor failed??? Pin
dealon4-Jun-08 21:36
dealon4-Jun-08 21:36 
GeneralRe: constructor failed??? Pin
toxcct4-Jun-08 21:38
toxcct4-Jun-08 21:38 
GeneralRe: constructor failed??? Pin
CPallini4-Jun-08 21:46
mveCPallini4-Jun-08 21:46 
AnswerRe: constructor failed??? [modified] Pin
ShilpiP4-Jun-08 21:32
ShilpiP4-Jun-08 21:32 
Is This program working ???
cout>>x>>endl;
cin<<ch;


try using debuging than you find that why x is not giving right output Smile | :)

#include "stdafx.h"
#include <iostream>
using namespace std;


class aa
{

	public:
	
		aa(int t = 5)
		{
			x = t;
		}
		void print()
		{
			cout<<x <<endl;
		
		}
	private:
		int x;
	
};
int main(int argc, char* argv[])
{
	aa t;
	t.print();
	cout<<"---------------------"<<endl;
	
	aa t1(4);
	t1.print();
	char ch;
	cin>>ch;

	
	return 0;
}


Yes U Can ...If U Can ,Dream it , U can do it ...ICAN

modified on Thursday, June 5, 2008 3:41 AM

GeneralRe: constructor failed??? Pin
toxcct4-Jun-08 21:37
toxcct4-Jun-08 21:37 
GeneralRe: constructor failed??? Pin
dealon4-Jun-08 21:43
dealon4-Jun-08 21:43 
AnswerRe: constructor failed??? Pin
ShilpiP4-Jun-08 21:56
ShilpiP4-Jun-08 21:56 
GeneralRe: constructor failed??? Pin
toxcct4-Jun-08 22:01
toxcct4-Jun-08 22:01 
JokeRe: constructor failed??? Pin
ShilpiP4-Jun-08 22:06
ShilpiP4-Jun-08 22:06 
GeneralRe: constructor failed??? Pin
dealon4-Jun-08 22:02
dealon4-Jun-08 22:02 
GeneralRe: constructor failed??? Pin
ShilpiP4-Jun-08 22:45
ShilpiP4-Jun-08 22:45 
GeneralRe: constructor failed??? Pin
dealon4-Jun-08 21:38
dealon4-Jun-08 21:38 
JokeRe: constructor failed??? Pin
ShilpiP4-Jun-08 21:59
ShilpiP4-Jun-08 21:59 
QuestionRadio Buttons Pin
jasmine_1234-Jun-08 20:37
jasmine_1234-Jun-08 20:37 
AnswerRe: Radio Buttons Pin
Cedric Moonen4-Jun-08 20:40
Cedric Moonen4-Jun-08 20:40 
GeneralRe: Radio Buttons Pin
jasmine_1234-Jun-08 20:44
jasmine_1234-Jun-08 20:44 
GeneralRe: Radio Buttons Pin
Akt_4_U4-Jun-08 20:53
Akt_4_U4-Jun-08 20:53 
GeneralRe: Radio Buttons Pin
SandipG 4-Jun-08 20:53
SandipG 4-Jun-08 20:53 
GeneralRe: Radio Buttons Pin
Hamid_RT4-Jun-08 21:25
Hamid_RT4-Jun-08 21:25 
GeneralRe: Radio Buttons Pin
toxcct4-Jun-08 21:28
toxcct4-Jun-08 21:28 
GeneralRe: Radio Buttons Pin
Hamid_RT4-Jun-08 21:33
Hamid_RT4-Jun-08 21: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.