#include <stdio.h>
int main()
{
int a = 4;
int b = 3;
addNumbers(a, b);
}
int addNumbers(int a, int b)
{
return a + b;
}
Run Code Online (Sandbox Code Playgroud)
为什么这不编译,我得到一条消息说隐含的函数声明addNumbers()?
private final String[] okFileExtensions = new String[] { "csv" };
Run Code Online (Sandbox Code Playgroud)
有人请解释为什么{}在String数组声明后写的?
谢谢.
我正在练习递归,我不明白为什么这种方法似乎不起作用.有任何想法吗?
public void fact()
{
fact(5);
}
public int fact(int n)
{
if(n == 1){
return 1;
}
return n * (fact(n-1));
}
}
Run Code Online (Sandbox Code Playgroud)
谢谢
鉴于这个循环,为什么最后会出现半结肠?
for(s = string; *s == ' '; s++)
;
Run Code Online (Sandbox Code Playgroud)
谢谢
编辑*所以可以反转这个过程,所以它从一个字符串的结尾开始,检查一个空格并减少直到找到一个charachter?
我试图在uni上破解我的C模块,但是我似乎无法让IDE工作.我想使用Visual Studio虽然我想我应该使用Unix(我还不够了解Unix).
如何在Visual Studio 2008中设置项目以使用C?我以前使用Visual Studio for VB.net,这是一个轻松使用,这由于某种原因证明有点困难.
我只是不知道在设置阶段我应该做什么,如果你知道我的意思,我可以看到所有我能看到的C++作为一个选项,因为它有很多子部分,没有一个我可以看出是相关的.
如果我错了,有人可以检查我的理解并纠正我吗?
int p = 5; //create an int holding 5
int *ptr; //create a pointer that can point to an int
*ptr = &p; // not sure - does this mean that my pointer now points to memory address five, or that the memory address my pointer points at contains 5?
Run Code Online (Sandbox Code Playgroud)
对不起基本的问题 - 我很快就有一个需要使用指针的assignmnet,我真的想在它设置之前破解基础知识.