help me plzz

Discussion in 'C' started by alienkhan, May 7, 2012.

  1. alienkhan

    alienkhan New Member

    Joined:
    May 7, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    i want to creat a header file in c++ using borland 5.02 plz help me indetail...if any one can
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    File -> New. Save as filename.h, in the directory you want it.
     
  3. alienkhan

    alienkhan New Member

    Joined:
    May 7, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    i code a program like this

    first i creat a file with add.h that is a header file
    after that
    i created a add.cpp file in which i mention a detail of a function that is to perform by an add function
    after that
    i code a main function in which i call a header file
    but it is giving a error of . invelid like some thing
     
  4. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,009
    Likes Received:
    203
    Trophy Points:
    63
    Occupation:
    Senior Support Engineer
    Location:
    England
    ". invelid like some thing"

    Riiiiiiiiiiiiight. That's really clear.
    Cos I'm a bit dumb, could you post the exact error?
     
  5. sumtaru

    sumtaru New Member

    Joined:
    May 17, 2012
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    First you create a header file, say add.h and put your declarations and functions there without main.
    Then create add.cpp and include your header file like this #include "add.h".Write main function and
    access data and functions from the header file.
     
  6. alienkhan

    alienkhan New Member

    Joined:
    May 7, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    thanks dear
    but i do all tricks
    i created in c
    but i fail to create it in c++


    i will post the code later . at present i did not have the code.
    thanks for coperation
     
  7. hRob

    hRob New Member

    Joined:
    May 18, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Copy paste is king. Please copy and paste whatever u have written, both .h and .cpp files, so that we can take a look and get back to you.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice