在VC++6.0环境下运行程序,连接出错怎么解决?

#include <iostream.h>class A{ public: A(int i,int j) { a=i;b=j; } void Offset(int x,int y) { a+=x;b+=y; } void Display(){ cout<<✀(✀<<a<<✀,✀<<b<<✀)✀<<endl; } private: int a,b;};class B:private A{ public: B(int i,int j,int k,int l):A(i,j){x=k;y=l;} void Display() {cout<<x<<✀,✀<<y<<endl;} void Move() {Offset(3,5);} void Show() {A::Display();} private: int x,y;};void main(){ A e(1,2); e.Display(); B d(3,4,5,6); d.Move(); d.Display(); d.Show();}以上是主程序,建立工程选择的是Win32 ApplationC/C++ resouce文件
2026年09月24日 07:32
有1个网友回答
网友(1):

是不是工程类型错了,Win32 Applation 主函数是WinMain
你应该建立的工程是Win32 console