`
hengxing2009
  • 浏览: 89111 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

return type of 'main' is not `int'

阅读更多
#include"stdio.h"
void main()
{
printf("hello,world!\n");
}

解决:
#include"stdio.h"
int main()
{
printf("hello,world!\n");
return 0;
}

分享到:
评论

相关推荐

    Google C++ Style Guide(Google C++编程规范)高清PDF

    We can declare (but not define) functions with arguments, and/or return values, of type Foo. (One exception is if an argument Foo or const Foo& has a non-explicit, one-argument constructor, in which ...

    数位板压力测试

    Programming is easiest when the amount of knowledge and effort required matches the task at hand. Writing simple programs should require only a few lines of code and a minimal understanding of the en-...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    Each command is terminated with an end-of-line terminator which can be either a carriage-return <c/r> or line feed <l/f>. For RS-232 models, the baud rate and terminator character are selected using ...

    微软内部资料-SQL性能优化3

    Another type of table lock is a schema stability lock (Sch-S) and is compatible with all table locks except the schema modification lock (Sch-M). The schema modification lock (Sch-M) is incompatible ...

    Java程序检查一个数字是否是霓虹灯数字.docx

    // Sum of digits of number obtained is // equal to original number if (sum == n) // number is neon return true; else // number is not neon return false; } // Main driver method public ...

    Debugging Malloc Lab: Detecting Memory-Related Errors

    a checksum for the header to ensure that it has not been corrupted (A checksum of a sequence of bits is calculated by counting the number of "1" bits in the stream. For example, the checksum for ...

    微软内部资料-SQL性能优化5

    The main difference between the two types of indexes is how much information is stored at the leaf. The leaf levels of both types of indexes contain all the key values in order, but they also contain ...

    extern 的用法示例

    int main() { printGlobal(); // 由于extern声明,可以在这里使用globalVar return 0; } ``` 在这个例子中,`File1.cpp`定义了一个全局变量`globalVar`,然后在`File2.cpp`中使用`extern`声明了它。这样,`main()...

    Java邮件开发Fundamentals of the JavaMail API

    The API's main purpose is not for transporting, delivering, and forwarding messages; this is the purview of applications such as sendmail and other Mail Transfer Agent (MTA) type programs. MUA-type...

    王小平版遗传算法的光盘源代码

    The main() is located in lib/gpc.c The top-level loop which iterates over the generations is in generations.c The data structures which you must work with are in the file gpc.h Expressions ...

    语言程序设计课后习题答案

    cout << "The size of an int is:\t\t" (int) ; cout << "The size of a short int is:\t" (short) ; cout << "The size of a long int is:\t" (long) ; cout << "The size of a char is:\t\t" (char) ; cout ...

    C PROGRAMMING TUTORIAL

    - As the return type of functions that do not return any value. #### C Variables Variables are used to store data in a program. ##### Variable Declaration in C Declaring a variable reserves ...

    南京师范大学gis专业2008研究生入学考试c语言试题

    int isPerfect(int num) { int sum = 0; for (int i = 1; i ; i++) { if (num % i == 0) { sum += i; } } return sum == num ? 1 : 0; } int main() { printf("Perfect numbers between 1 and 1000:\n"); ...

    stdafx.h代码

    stdafx.h的代码// This is a part of the Microsoft Foundation Classes C++ library. // Copyright (C) 1992-1998 Microsoft Corporation // All rights reserved. // // This source code is only intended as a ...

    Keil的常见编译警告

    6. warning: #167-D:argument of type "uint8_t *" is incompatible with parameter of type "const char *restrict" 这个警告信息表示uint8_t *类型的参数与const char * restrict类型的参数不兼容。在参数传递时...

    DbfDotNet_version_1.0_Source

    Dbf.Net does not have transactions and is not ACID. Lets not focus to much on speed but more on code differences: Creating a Table Creating the table is quite different. Dbf.Net requires a type ...

    gertt点阵图读取器(opengl)

    // The Type Of Depth Testing To Do glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations return TRUE; // Initialization Went OK } int ...

    嵌入式Linux相关_GCC精彩之旅

    illcode.c:8: return type of `main' is not `int' ``` 通过增加`-Werror`选项可以让GCC在遇到警告时停止编译: ``` gcc -Wall -Werror illcode.c -o illcode ``` 此时GCC会在出现第一个警告时停止编译过程,提示...

Global site tag (gtag.js) - Google Analytics