Updating a distributed program

I hope that I'm posting this question in the correct forum, I believe that this is a beginner question. If not, I apologize.

So, I've started creating a C++ program using the CodeBlocks compiler. I'd like to send my project to a friend, who believes software is "whack". (He's a hardware person..)

My question is, how would I be able to later update my program and send that update to him? (Besides sending him the entire new updated file.)

Ex:
Now, Program does -
1+1=3

Later 'Updated/Fixed', program does -
1+1=2

What would be the best yet not incredibly complicated way to do that?

So, if I sent him my program yesterday and updated it today so when he starts it tomorrow, it'd show "New Update Available! Do you want to Update?" or whatever.

Thank you!
I apologize again IF this was posted in the wrong forum.
Delete old replace with new.
Granted I only read the title, but software repositories could be your solution here. I recommend Git: http://git-scm.com/
One way is to write the code, as code should be written, which is modular.

1- define your global vars - better yet , keep them in a file so you can update them outside of yor code.

2- Keep MAIN() as small as possible.

void main(int argc, char *argv[]) {
struct do_everything( this, that);
}

this(){}

that() {}

return aLot;


- - - - - - -
besides doing it that way, you can also create CLASSES , where you would keep THIS() in the THIS class file
and THAT() in the THAT class file

and when you make a change to one ( or both) of the class files then you would re-compile that file and send just that single file ( or both as needed).

I don't recall the best method to do this, whether in DLL's, include files, data files, other LIB files, or just external c files ( or CPP ), but this is one way that you can have your friend run your code, and make / send updates .




Topic archived. No new replies allowed.