expected init-declarator before "int"

This is a discussion on expected init-declarator before "int" within the Windows Programming forums, part of the Platform Specific Boards category; 112 C:\Dev-Cpp\Project31321\project31321.cpp expected init-declarator before "int" what ? Code: int Printhostent(LPCSTR lpServerNameOrAddress) { .... devcpp i have it declared as ...

  1. #1
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638

    expected init-declarator before "int"

    112 C:\Dev-Cpp\Project31321\project31321.cpp expected init-declarator before "int"
    what ?

    Code:
     int Printhostent(LPCSTR lpServerNameOrAddress)
    {
    ....
    devcpp

    i have it declared as
    Code:
    // Function to print a hostent structure
    int  Printhostent(LPCSTR lpServerNameOrAddress);

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,762
    Look back a few lines, you probably missed a ; off the end of a class/struct
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    thank you. found it. at first i thought it said int-declarator before "int" instead of init-declarator before "int". and thought "int" needed to be declared before "int" so i tried casting (int). usually i get "expected ';' or missing ';'.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Post...
    By maxorator in forum C++ Programming
    Replies: 12
    Last Post: 10-11-2005, 09:39 AM
  2. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 10:23 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  5. Windows using Dev-C++
    By Renegade in forum C++ Programming
    Replies: 15
    Last Post: 07-07-2005, 09:29 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21