获得第一个基本的“Hello World”程序工作 [英] Getting a first basic "Hello World" program working

查看:77
本文介绍了获得第一个基本的“Hello World”程序工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我没有真正有正规路线的钱,所以我去了图书馆拿起一本旧的c ++书,看来我遇到了过时的标题。一遍又一遍地。问题似乎并不是标题,因为我搜索并浏览了其他三个处理相同问题的线程,但没有解决我的问题。


首先,我有Dirk Henkemans的绝对初学者的C ++编程副本,我正在使用Dev-C ++ 4.9.9.2。


这是我能找到的唯一免费编译器,除了for dummy之外,这是我能找到的唯一一本书。迭代,回想起来可能是一个好主意。但我离题了,我的问题如下:

#include< cstdlib>

#include< iostream>

using namespace std;

int main()

{

cout<< Hello World !!! ; //这是我的错误行

返回0;

}



我不太确定问题是什么不仅仅是一个快速的回答我真的很感激这个问题的解释,希望以外行人的名义,因为我确实是一个门外汉。


请?


将非常感谢任何和所有的帮助,从现在开始的任何形式的指导将是令人敬畏的!我一直想学习,我只是没有设备/程序所需的那种钱。


我的名字是Lenin Chavez,我希望能够随着时间的推移,你知道很多人。再次感谢!结束;


ps。当我第一次报名开玩笑时,那是$ username吗?它让我轻笑。

Hi all, I don''t really have the money for the formal route so I went to the library and picked up an older c++ book and it seems I run into "antiquated headers" over and over again. The problem doesn''t seem to be the headers though because I searched and skimmed over three other threads dealing with the same problem and none of which solved my problem.

First and foremost, I have a copy of C++ Programming for the absolute beginner by Dirk Henkemans and I''m using Dev-C++ 4.9.9.2.

That was the only free compiler I was able to find and this was the only book I was able to find besides the "for dummy''s" iterartion, which thinking back might have been a good idea. But I digress, my problem is as follows:
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!!!" ; //here is my error line
return 0;
}


I''m not exactly sure what the problem is. More than a quick answer I''d really appreciate an explanation to the problem, hopefully in layman''s terms because I indeed am a layman.

Please?

Any and all help will be greatly appreciated and any kind of guidance from here on out would be aweome! I''ve always wanted to learn, I just don''t have the kinda money one needs for the equipment/programs.

My name is Lenin Chavez and I hope to get to know the lot of you a lot better with time. Thanks again! endl;


ps. was that $username thing when I first signed up a joke? it made me chuckle.

推荐答案

当我第一次开玩笑时,用户名是什么东西?它让我笑了。
username thing when I first signed up a joke? it made me chuckle.


错误说的是什么????


问候

Dheeraj Joshi
What does the error says????

Regards
Dheeraj Joshi


足够有趣的错误已经不见了,但现在我还没有得到一个程序可以运行。 DOS窗口在屏幕上跳转,但我没有机会获得任何输入,因为它再次消失,我被带回项目屏幕。


我猜我的问题并没有我想象的那么严重,现在我回过头来清理代码并重新编写代码,但我仍然没有真正确认我是否做得对。



另外,你可以向我解释一下int main()和int main(int argc,char * argv [])之间的区别


int main()是本书告诉我应该在那里的,但后者是程序给我的。


对不起,如果我的问题太过神秘,我真的不知道这些是什么意思。
Funny enough the "error" is gone but now I just don''t get a program to run. The DOS window jumps on the screen but I am not given an opportunity for any input as it just disappears once again and I''m taken back to the project screen.

I guess my problem wasn''t as severe as I first thought, now that I went back and cleared the code and re-wrote it in, but I still get no real confirmation to whether or not I did it right.


Another thing, might you be able to explain to me the difference between having int main() vs int main(int argc, char *argv[])

int main() is what the book is telling me should be there, but the latter is what the program is giving me.

Sorry if I''m being too cryptic in my questions, I just really don''t know what these things mean.


这篇关于获得第一个基本的“Hello World”程序工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆