Solved

Compilation errors

Posted on 2004-10-27
194 Views
Last Modified: 2010-04-01
Hi,

i am getting the following compilation errors

(1) funxtion xyz must have a protoype.
(2) type abc is Incomplete.

xyz has a protoype that is defined in xyz.h which i have included in the main file.
Same for abc.

Can someone tell me waht the problem could be?

Thanks
0
Question by:dkamdar
    8 Comments
     
    LVL 23

    Expert Comment

    by:brettmjohnson
    You will have to include the prototypes for xyz and abc here, including the surrounding
    lines from the xyz.h file.  It is very likely that there is missing punctuation or closing
    comment in the previous lines.

    0
     
    LVL 55

    Accepted Solution

    by:
    maybe your header file has some "guards" like:

    #ifndef XFILE_INCLUDED
    #define XFILE_INCLUDED

      // all your header code here

    #endif

    So, to include sucefully a file, doesn't ensure you to "activate" all the code inside.
    In the case shown, by example, maybe XFILE_INCLUDED is yet defined, avoiding to execute the inside code.
    0
     
    LVL 17

    Expert Comment

    by:rstaveley
    > Can someone tell me waht the problem could be?

    Namespace, perhaps? Typo (e.g. case)? Terrorist insurgency? Usual candidates. We'd need to see some code.
    0
     

    Author Comment

    by:dkamdar
    What is Terrorist insurgency?
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    Some experts must be careful with jokes that can offend other members, since EE have thousand of non-occidental members.
    Remember unfortunate words of George Bush: http://www.csmonitor.com/2001/0919/p12s2-woeu.html
    A trivial word for an occidental could sound offensive for another people.
    Just my opinion.
    Jaime.
    0
     
    LVL 17

    Expert Comment

    by:rstaveley
    dkamdar, here's a peer-reviewed definition of insurgency http://en.wikipedia.org/wiki/Insurgency . It was a lame attempt at humour. I appreciate where Jaime is coming from, but I would have thought that the absurdity of the comment was no more offensive to one cuture than another, and C++ without humour is just too dry to contemplate. Let's drop the subject though... I'm in danger of starting a flame war. Could you post some code, and I'll attempt to show you that I can be helpful, when I'm not jumping in political mine fields.
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    Reading wikipedia link I've found Sabotage would be are more comprensible joke.
    We are specultating about dkamdar's problem until he post code, but surely it's a trivial problem.

    0
     

    Author Comment

    by:dkamdar
    guys ... I am not offended.
    I was actually asking if it did mean something technical ... i know ... dumb like that!

    I appreciate both of your's concerns and gestures so lets end it here.

    As far as the code goes ... i cannot post it in the forum ... belongs to my company ... lot of copyright crap ... dont wanna invite trouble :)

    But this speculation by Jaime worked:

    maybe your header file has some "guards" like:

    #ifndef XFILE_INCLUDED
    #define XFILE_INCLUDED

      // all your header code here

    #endif

    It did have some guards and i had to include another file that activated those gaurds.

    peace :)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
    IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    909 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now