Click here to Skip to main content
15,915,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C2143 Pin
super_ttd14-Jun-08 23:26
super_ttd14-Jun-08 23:26 
AnswerRe: C2143 Pin
Cedric Moonen4-Jun-08 22:50
Cedric Moonen4-Jun-08 22:50 
QuestionRe: C2143 Pin
T.RATHA KRISHNAN4-Jun-08 22:55
T.RATHA KRISHNAN4-Jun-08 22:55 
QuestionRe: C2143 Pin
David Crow5-Jun-08 2:54
David Crow5-Jun-08 2:54 
Questionconstructor failed??? [modified] Pin
dealon4-Jun-08 21:05
dealon4-Jun-08 21:05 
AnswerRe: constructor failed??? Pin
Cedric Moonen4-Jun-08 21:12
Cedric Moonen4-Jun-08 21:12 
GeneralRe: constructor failed??? Pin
CPallini4-Jun-08 21:19
mveCPallini4-Jun-08 21:19 
AnswerRe: constructor failed??? Pin
toxcct4-Jun-08 21:13
toxcct4-Jun-08 21:13 
GeneralRe: constructor failed??? Pin
CPallini4-Jun-08 21:21
mveCPallini4-Jun-08 21:21 
GeneralRe: constructor failed??? Pin
toxcct4-Jun-08 21:22
toxcct4-Jun-08 21:22 
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 

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.