How to get the invoked command and parameters as one string instead of a list of argv-s (especially gcc under Linux)?
skabaw
0
Newbie Poster
Recommended Answers
Jump to PostBuild it manually:
#include <iostream> #include <string> int main ( int argc, char *argv[] ) { std::string args; for ( int i = 0; i < argc; i++ ) { args += argv[i]; if ( i != argc - 1 ) args += ' '; } std::cout<< …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.