第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

error LNK2019: 無法解析的外部符號

error LNK2019: 無法解析的外部符號

C++
等候稻香 2015-09-16 18:17:27
#include "stdafx.h"#include <iostream>#include <stdlib.h>#include "Coordinate.h"using namespace std;/*****************************************//*對象數(shù)組*要求:* ? ? 定義Coordinate類* ? ? 數(shù)據(jù)成員分別是m_iX,m_iY;* ? ? 分別通過棧和堆實(shí)例化長度為3的對象數(shù)組* ? ? 給數(shù)組中元素賦值* ? ? 遍歷兩個(gè)數(shù)組******************************************/int main(void){ Coordinate coor[3]; coor[0].m_iX = 3; coor[0].m_iY = 5; for (int i = 0; i < 3;i++) { cout <<"coor_X="<<coor[i].m_iX << endl; cout<<"coor_Y="<< coor[i].m_iY << endl; } Coordinate *p = new Coordinate[3]; p->m_iX = 7; p[0].m_iY = 9; p++;//p+=1;p=p+1; p->m_iX = 11; p[0].m_iY = 13; p[1].m_iX=15; p++; p->m_iY = 17; for (int j = 0; j < 3;j++) { cout <<"p_X="<< p->m_iX << endl; cout <<"p_Y="<<p->m_iY << endl; p--; } p++; delete[]p; system("pause");? ? return 0;}//代碼:Line.h#include <iostream>#include <stdlib.h>#include "Coordinate.h"using namespace std;class Line{public: Line(int x1,int y1,int x2,int y2); ~Line(); void setA(int x,int y); void setB(int x,int y); void printInfo();private:Coordinate m_coorA;Coordinate m_coorB;};//Line.cpp#include <iostream>#include <stdlib.h>#include "Coordinate.h"#include "Line.h"using namespace std;Line::Line(int x1,int y1,int x2,int y2):m_cooA(x1,y1),m_coorB(x2,y2)//初始化列表{ cout << "Line()" << endl;}Line::~Line(){ cout << "~Line()" << endl;}void Line::setA(int x, int y)?{ m_coorA.setX(x); m_coorB.setY(y);}void Line::setB(int x, int y){ m_coorA.setX(x); m_coorB.setY(y);}void Line::printInfo(){ cout <<"("<<m_coorA.getX()<<","<<m_coorA.getY()<<")"<< endl; cout <<"("<<m_coorB.getX()<<","<<m_coorB.getY()<<")"<< endl;}#include <iostream>#include <stdlib.h>using namespace std;class Coordinate{public: Coordinate(); ~Coordinate(); void setX(int x); int getX(); void setY(int y); int getY();public: int m_iX; int m_iY;};#include "stdafx.h"#include <iostream>#include <stdlib.h>#include "Coordinate.h"using namespace std;Coordinate::Coordinate(){ cout <<"Coordinate() " <<m_iX<<","<<m_iY<< endl;}Coordinate::~Coordinate(){ cout << "~Coordinate() "<<m_iX<<","<<m_iY<< endl;}void Coordinate::setX(int x){ m_iX = x;}int Coordinate::getX(){ return m_iX;}void Coordinate::setY(int y){ m_iY = y;}int Coordinate::getY(){ return m_iY;}
查看完整描述

1 回答

?
onemoo

TA貢獻(xiàn)883條經(jīng)驗(yàn) 獲得超454個(gè)贊

發(fā)帖時(shí)最好將代碼格式化一下, 你這樣把縮進(jìn)都丟了,看著太亂...

查看完整回答
反對 回復(fù) 2015-09-16
  • 1 回答
  • 0 關(guān)注
  • 1426 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號