Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help on C++ code - how to instantiate in another code

Status
Not open for further replies.

uditkumar1983

Advanced Member level 4
Joined
Dec 3, 2006
Messages
107
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,298
Location
India
Activity points
2,019
Help on C++

Hi Friends,

I have one doubt:

Suppose I have one code written in c++, Now I want to instantiate in another code so how I can do it..

Please help me... I m new to c++ ( I am a HDL designer).

Thanks & Regards,
Udit Kumar
 

Re: Help on C++

Hi uditkumar1983,

I'm both HDL designer an C++ programmer. When we talk about a C++ programm, we do not "instantiate" a code like we can instantiate an floating-point-adder-code in VHDL, for example.
What you want may be a library:
You Write one C++ file where various functions a declared and save this file under "myLib.h". Now you can use this functions in another file by writting
Code:
#include "myLib.h"
in the top-part of your file (the part where you include other libs, like "stdio.h" or "iostream")

greetings,
magixD
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top