Computer problems,Computer help
*AX SOFT>>>Programming & Design

Error C4430: missing type specifier - int assumed. Note: C++ does not support default-int?


#include "stdafx.h"
#include <iostream>
using namespace std;

main()
{
int h;

cout << "Enter an age and press ENTER: \n" << h;
cin >> h;

if (h <= 0 && h >= 12)
cout << "The subject is a child.\n" << h;

else if (h <= 13 && h >= 19)
cout << "The subject is a teenager.\n" << h;

else if (h <= 20 && h >= 60)
cout << "The subject is an adult.\n" << h;

else if (h <= 61 && h >= 100)
cout << "The subject is an adult.\n" << h;

else
cout << "The subject is dead.\n" << h;

return 0;
}

can someone help me so the error goes away?

main()
...should be...
int main(void)

...aside from that, you should probably work on understanding how "else if" works.

Tags
  General - Computers & Internet   Software   Security   Programming & Design   Facebook   Flickr   Google   MSN   MySpace
Related information
  • Open source function... Or how to do this conversion?

    I recommend the open source CxImage library located at

    ...
  • Can anybody tell me what font this is?

    It's a version of DIN. See ...

  • I do I exclude myself from being counted as a hit on my website?

    FOR GOOGLE ANALYTICS ...

  • What is the best sample rate and bit depth to embed sound effects into Flash for a website game?

    16bit 44.1 for music, going down to 8bit 22 for sound effects, consider using the sound FX in mono to conserve space (most people won't notice).

    ...
  • How can i make a counter appear in the next line at a certain number in c++?

    Assuming your counter starts at zero: if (!(count % 5)) printf("\r"); Just add that line into your loop (changing 'count' to whatever your variable name is) if your cou...

  • I have gamemaker 4 from yoygames. is it still ok to distribute games made with gm4?

    Yes and no. Your actual rights are stipulated in the Game Maker Software end user licence agreement and the Yoyogames.com website. If you upload your GM game to Yoyogames.com, they "can use ...

  • Whats the code for making a java applet (picture) which uses: a semi-oval, oval, circle, rectangle, and line?

    There are a number of ways to accomplish this. The solution depends on if you're wanting to use AWT, Graphics2D, JFC Swing, or even a non-standard library. The shortest number of code lines...

  • Image storage?

    I dont know in coldFusion but in i know in PHP. Just save image location in your server to Mysql. For example i have me.jpg, in my localhost field "location" and the value is c://windows/...

  •  

    Categories--Copyright/IP Policy--Contact Webmaster