From: bowes AT cgocable DOT net Message-Id: <199807201640.MAA20431@mail.cgocable.net> To: djgpp AT delorie DOT com Date: Mon, 20 Jul 1998 12:44:46 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Help w/ CGI class Precedence: bulk Hi folks, I'm attempting to write a html post form handler class and it always fails with a call to strtoul(). Can someone help figure this out? Code follows... and TIA!! #include #include void setup() {putenv("CONTENT_LENGHT=12345");} // For testing... class CGIApost { public: CGIApost(); private: char **query; }; CGIApost::CGIApost() { setup(); char *endptr; const char *l = getenv("CONTENT_LENGTH"); unsigned long length; length = strtoul(l, &endptr, 10); // <-- Fails here cout << length << endl; } int main() { CGIApost c; return 0; }