I am just starting a personal project that people other than myself will actually see, its a set of DnD tools (I know theirs gotta be hundrds of them but its more for the practice than anything else).
The thing is I have never written to any kind of standard, my code tends to be haphazard, under commented, I have *never* written documentation and never worried about standardising the output, or worrying about debugging beyond passing what my lecturer asks for.
I could really use some help in this, online articles, books etc ... I should learn to write legible code, comment properly and sort out errors with a little more finesse. Preferably matching GNU code?
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
//their should only be one argument
if (argc != 2)
{
cout<<"Error: invalid argument\n";
return 1;
}
else //if theirs one argument, were ok
{
cout<<"Valid argument\n";
}
return 0;
}
The thing is I have never written to any kind of standard, my code tends to be haphazard, under commented, I have *never* written documentation and never worried about standardising the output, or worrying about debugging beyond passing what my lecturer asks for.
I could really use some help in this, online articles, books etc ... I should learn to write legible code, comment properly and sort out errors with a little more finesse. Preferably matching GNU code?
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
//their should only be one argument
if (argc != 2)
{
cout<<"Error: invalid argument\n";
return 1;
}
else //if theirs one argument, were ok
{
cout<<"Valid argument\n";
}
return 0;
}
