为什么不编译它有什么问题..? [英] Why will not compilen what is the problem in it..?

查看:86
本文介绍了为什么不编译它有什么问题..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  #include   <   iostream  >  
使用命名空间标准;

Void lmn( int &)

Int main()
{
Int x;
X = 60 ;
Lmn(x);
Cout>> x>> endl;
返回 0 ;
}

Void lmn( int p)
{
P = 1005 ;
}





我的尝试:



我已经编译了它但它会编译编译bt为什么它不会编译什么是什么它不会我们怎么理解它???

解决方案

顺便说一下:你的代码是c而不是c ++。



你的代码中有大约14个错误。你有没有读过教程?如果不是谷歌搜索并阅读一些介绍。



您的代码中的大多数错误都是您不关心区分大小写。所以请将以下内容与您的代码完全比较,并尝试自己解释错误。

  #include  <跨度类= 代码预处理器> <跨度类= 代码关键字><  <跨度类= 代码leadattribute> iostream的 <跨度类= 代码关键字> >  
使用 命名空间标准;

void lmn( int &);

int main()
{
int X;
x = 60 ;
lmn(x);
cout<< x<< ENDL; // 这里您尝试流式传输到cout
getchar();
return 0 ;
}

void lmn( int & p)
{
p = 1005 ;
}
< / iostream>





我希望它有所帮助,祝你好运。


你发了多少次同样的问题?



Quote:

我已经编译了它,但是它会代码编译bt为什么它不会编译什么是prblm为什么它不会是我们如何理解它?

它是否编译?

如果不编译,则给出错误消息。错误信息可以帮助您找到问题所在。



引用:

我们怎么理解.. ??

这是你的第一个程序,你想跳过步骤,这是一个坏主意。



建议:通过阅读文档和关注来学习语言教程。

要学习C / C ++基础(X为C的祖先++)

C程序设计语言 - 维基百科,自由百科全书 [ ^ ]

https://hassanolity.files.wordpress.com/十一分之二千零十三/ the_c_programming_language_2.pdf [ ^ ]

http:// www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf [ ^ ]



Quote:

为什么代码不能编译?

因为你没有知道C语法。

首先要学习的是C / C ++区分大小写。

这意味着 void Void 不是一回事。



你有很多阅读。


#include<iostream>
Using namespace std;

Void lmn (int &)

Int main ()
{
  Int x;
  X=60;
  Lmn (x);
  Cout >>x>>endl;
  Return 0;
}

Void lmn (int p)
{
  P=1005;
}



What I have tried:

I have compile it but it will code compile bt why it will not compile n whats the prblm why it will not n how we understand it..??

解决方案

Btw: Your code is c not c++.

You have about 14 mistakes in your code. Did you ever read a c tutorial? If not search with Google and read some introductions.

Most mistakes in your code is you did not care about case sensitivity. So please compare the following exactly with your code and try to explain yourself the mistakes.

#include<iostream>
using namespace std;

void lmn (int &);

int main()
{
  int x;
  x=60;
  lmn (x);
  cout << x << endl;  // Here you tried to stream to cout
  getchar();
  return 0;
}

void lmn (int & p)
{
  p=1005;
}
</iostream>



I hope it helps, good luck.


How many times did you post the same question ?

Quote:

I have compile it but it will code compile bt why it will not compile n whats the prblm why it will not n how we understand it..??

It compile or not ?
If it don't compile, give the error messages. Error messages are here to help you find what is wrong.

Quote:

how we understand it..??

This is your very first program and you want to skip steps, it is a bad idea.

Advice: learn the language really by reading documentations and following tutorials.
To learn C/C++ basics (X is the ancestor of C++)
The C Programming Language - Wikipedia, the free encyclopedia[^]
https://hassanolity.files.wordpress.com/2013/11/the_c_programming_language_2.pdf[^]
http://www.ime.usp.br/~pf/Kernighan-Ritchie/C-Programming-Ebook.pdf[^]

Quote:

Why code will not compile?

Because you don't know the C syntax.
First thing you have to learn is that C/C++ is case sensitive.
It means that void and Void are not the same thing.

You have a lot of reading ahead.


这篇关于为什么不编译它有什么问题..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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