Producing the file

haha, I called it the file because I don't know what it's actually called. That bit of information would be good too :)

say I have my class built, with functions, and what not...how to I combine the files, if that's what you have to do...so that you get the file that you would distribute so that people could use the methods, without seeing the actual code of the classes themselves?

I don't really need this at the moment, but it would be good for future reference, and extra learning, while I'm at it.
you mean something that automatically generates the documentation for you? So you can look up how certain classes are used and such?

I think there are programs that already do that. Doxygen is one for example which you can get from the following link:

http://www.stack.nl/~dimitri/doxygen/
nah, that's not what I mean. Say you produced a wicked class, and you want to distribute it so people can use the functions, but not see what's in the class. That type of thing...that way they can't make changes to the code...they can only use the functions in it..
I'm not sure that's possible. Either you produce a precompiled program and send out the executable, or you send the code and have them compile it. A single compiled class? Don't think that's an option.

In my PHP/Java days, we did use an encoding tool (IonCube, I believe) to hide our distributed code. Not sure if that exists for C++.
not really a class...I was watching a video on the new boston, and he talked about creating two files. a .cpp, and a .h...and then said something, and then mentioned people being able to use the methods without being able to edit the code of the .cpp....maybe something about combining the files or something.. I'm gonna link the video to the thread as soon as the site starts working...seems to me every time you want to do something thats when it stops working, lol.

I think saying class was the wrong thing in the beginning of my posts, but it involves classes...

sense I can't find the video, I'll ask a different question... lol

is it possible to create a file of any time that makes use of classes that people can include in their project, and use the methods, but not be able to edit the code?
Do you mean a library, where you have a .h file and a .lib file which contains the compiled code that you can't edit?
Someone else can then use your classes without being able to see how the code is written.
Whenever you complie one of your programs, you should get an "executable" <That's the word you're looking for.

It depends on the compiler you're using and the save path as to where this is stored.
I am using "code::blocks" IDE(Intergrated Development Environment). If I compile a new project, I get the exe stored in a folder of the project name (in a destination pre-determined by me), and within the project's folder there is a "bin" and then a "debug" folder. This contains my executable.

the "combining" of the files is called linking. The IDE does 3 main things; debugs, links and compiles.

Now depending on how your program was written, It may not be compatible with different operating systems, or it may require dlls to be distributed with it.

If you want to make programs for Windows, you will probably need to learn how to program using the windows GUI(Graphical user interface). If you have another OS in mind you will have to understand the ways specific to programming for that OS.
A cross platform program may be written to be compatible with different architectures, operating systems, and/or GUIs.
"Do you mean a library, where you have a .h file and a .lib file which contains the compiled code that you can't edit?
Someone else can then use your classes without being able to see how the code is written. " That's the type of thing I meant, but nah, it's not what I meant..I just knew what I wanted to do, lol. plus heard some guy talking about it....

so that would be a dll, or something all together different?
What kind of library would have to be created to achieve this protected code (thingy) for lack of the right term ,lol.
Topic archived. No new replies allowed.