majid6
دوشنبه 25 اسفند 1393, 09:43 صبح
باسلام به همه دوستان.لطف کنید راهنماییم کنید که مشکل برنامه نوشته شده من چیه؟
که البته اینجا که کپی پیست کردم یه خورده به هم ریخته شده.تو این لینک (http://s4.picofile.com/file/8177304226/304.txt.html) فایل تکست کم حجمش رو قرار دادم.
عکس زیر هم ارور هایی هست که ویژوال استادیو2012 از من گرفته.
لطفا کمک کنید.ممنون
// 304.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
class Ratio
{
public:
void assign(int,int);
void print();
private:
int num, den;
};
/*Ratio::Ratio()
{
}
Ratio::~Ratio()
{
}*/
int _tmain(int argc, _TCHAR* argv[])
{
Ratio x;
Ratio y;
x.assign(13,7);
y.assign(19,5);
cout<<"x=";
x.print();
cout<<endl;
cout<<"y=";
y.print();
cout<<endl;
return 0;
//_getch;
}
void Ratio::assign(int numerator, int denumierator); //numerator?numirator
{
num=numerator;
den=denumirator;
}
void Ratio::print()
{
cout<<num<<'/'<<den;
}
129471
که البته اینجا که کپی پیست کردم یه خورده به هم ریخته شده.تو این لینک (http://s4.picofile.com/file/8177304226/304.txt.html) فایل تکست کم حجمش رو قرار دادم.
عکس زیر هم ارور هایی هست که ویژوال استادیو2012 از من گرفته.
لطفا کمک کنید.ممنون
// 304.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include<iostream>
#include<conio.h>
using namespace std;
class Ratio
{
public:
void assign(int,int);
void print();
private:
int num, den;
};
/*Ratio::Ratio()
{
}
Ratio::~Ratio()
{
}*/
int _tmain(int argc, _TCHAR* argv[])
{
Ratio x;
Ratio y;
x.assign(13,7);
y.assign(19,5);
cout<<"x=";
x.print();
cout<<endl;
cout<<"y=";
y.print();
cout<<endl;
return 0;
//_getch;
}
void Ratio::assign(int numerator, int denumierator); //numerator?numirator
{
num=numerator;
den=denumirator;
}
void Ratio::print()
{
cout<<num<<'/'<<den;
}
129471