[HH] c++ strings?
Greg London
email at greglondon.com
Tue Nov 20 13:57:30 EST 2012
Ah, that put me in the right direction.
main.cpp looks like this:
#################################
#include <iostream>
using namespace std;
#include "logger.h"
int main ()
{
Note("hello world\n");
return 0;
}
logger.h looks like this:
##################################
#include <iostream>
using namespace std;
extern void Note(string msg);
logger.cpp looks like this:
##################################
#include <iostream>
using namespace std;
void _say(string msg){
cout<<msg;
}
void Note(string msg){
_say("Note: "+msg);
}
my compile command looks like this:
#######################################
g++ logger.cpp main.cpp
This looks like quite lovely code now.
Thanks!
Greg
More information about the Hardwarehacking
mailing list