In C++, How do I insert a block of codes in the middle of my Main?

Discussion in 'C++' started by Mr. Ken, Jun 2, 2006.

  1. Mr. Ken

    Mr. Ken Guest

    I used Perl to generate some C++ codes, which is stored in a "all_tests.c",
    which needs to be inserted into a particular line in the main.cpp.

    How do I accomplish this?
    (I used to do this in Verilog codings).

    TIA.
    Mr. Ken, Jun 2, 2006
    #1
    1. Advertising

  2. Mr. Ken

    Kai-Uwe Bux Guest

    Mr. Ken wrote:

    > I used Perl to generate some C++ codes, which is stored in a
    > "all_tests.c", which needs to be inserted into a particular line in the
    > main.cpp.
    >
    > How do I accomplish this?


    On that line do:

    #include "all_tests.c"


    Best

    Kai-Uwe Bux
    Kai-Uwe Bux, Jun 2, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg  --
    Replies:
    4
    Views:
    2,156
  2. morrell
    Replies:
    1
    Views:
    947
    roy axenov
    Oct 10, 2006
  3. Replies:
    2
    Views:
    2,820
    Malcolm
    Aug 20, 2005
  4. Allen
    Replies:
    1
    Views:
    651
    Mark Rae [MVP]
    Dec 3, 2007
  5. ituhaf
    Replies:
    0
    Views:
    184
    ituhaf
    Jun 5, 2014
Loading...

Share This Page