![]() |
| | #1 |
| Guest
Posts: n/a
| Putting variables in SYSTEM ?? Do I need a string? Pls help thanks. |
|
| | #2 |
| C++ Developer Join Date: Jun 2002 Location: UWaterloo
Posts: 2,718
| Use sprintf( ). Code: #include <cstdio>
#include <cstdlib>
int main( void ) {
char *aString = "Hello";
char buffer[ 256 ];
sprintf( buffer, "test %s", aString );
system( buffer );
}
__________________ Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie Last edited by XSquared; 05-29-2003 at 05:14 PM. |
| XSquared is offline | |
| | #3 |
| Guest
Posts: n/a
| Would someone mind elaborating a little on that? Ive read up and cant get it. |
|
| | #4 |
| Guest
Posts: n/a
| Sorry im blind |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| esbo's data sharing example | esbo | C Programming | 49 | 01-08-2008 11:07 PM |
| [question]Simulating the Reliability of a Component-Based System [with my code] | burbose | C Programming | 4 | 06-13-2005 09:03 AM |
| [question]Simulating the Reliability of a Component-Based System | burbose | C Programming | 3 | 06-13-2005 07:28 AM |
| Why Can't C++ Be Used to Develop Operating System? | Antigloss | C++ Programming | 7 | 05-27-2005 06:16 AM |
| System Calls && Variables | Okiesmokie | C++ Programming | 6 | 03-06-2002 09:10 PM |