我只是问初学者程序员一个通用问题:如何为初学者设置/配置 Visual Studio Express 2013?
我问是因为我在编译一个简单的“Hello World”程序时遇到了麻烦。
这是我的代码:
#include <iostream>
int main()
{
cout << "Hello World!" << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
这些是错误:
Error 1 error C2065: 'cout' : undeclared identifier c:\users\blake\documents\visual studio 2013\projects\hello world\hello world\app.xaml.cpp 6 1 Hello world
Error 2 error C2065: 'endl' : undeclared identifier c:\users\blake\documents\visual studio 2013\projects\hello world\hello world\app.xaml.cpp 6 1 Hello world
Warning 3 warning C4447: 'main' signature found without threading model. Consider using 'int main(Platform::Array<Platform::String^>^ args)'. c:\users\blake\documents\visual studio 2013\projects\hello world\hello world\app.xaml.cpp 8 1 Hello …Run Code Online (Sandbox Code Playgroud) 我想知道我应该使用什么而不是goto语句?
我应该使用嵌套的if/while/do-while语句吗?
他们说使用goto会创建'意大利面条代码',但是如果有人正在编写一个大型控制台应用程序,并且他们在if语句之后使用if语句来试图控制流量,那么这会变得一团糟吗?
我问很多人都问为什么goto语句不好,但不知道要用什么来代替它.我相信很多初学者都可以做到这一点.
这适用于C++.
我是Java初学者,我正在研究子类和超类.
我知道你可以将不在超类中的值/属性/行为添加到子类中,使其更具"特定于任务".
但我的问题是,我可以从子类中删除属于超类的属性或行为值吗?
c++ ×2
attributes ×1
behavior ×1
goto ×1
if-statement ×1
installation ×1
java ×1
superclass ×1