Thread: expected init-declarator before "int"

  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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    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.

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