What else could I use other than system() ? I use it cause its all I know so far, also, I dont quite understand that code you typed, and it gives me the same result as before
Type: Posts; User: moagim
What else could I use other than system() ? I use it cause its all I know so far, also, I dont quite understand that code you typed, and it gives me the same result as before
Yeah but I want to be able to store what I type in the string without the quotes, isnt that possible?
[edit]
Doesnt work with quotes anyway
#include <iostream>
#include <dos.h>
#include <string>
using namespace std;
int select;
string host, msg;
string systemSender = "net send ";
The program seems to run with just the iostream header file on its own, why arent the others required? Just curious
Sweet everything works thanks
So what can it take two of?
The +'s dont seem to work, I get an error on compile but I'll show you what does work.
#include <iostream>
#include <dos.h>
#include <string>
using namespace std;
char host[64], msg[512];
I got a compile error from Dev C++ telling me
systemSender += host + msg;
is wrong, so I changed it to
systemSender += host, msg;
and it compiles fine. Everything seems to be working fine...
Hey guys, I'm not sure if what I'm trying to do is possible or the way I should do it. Basically I want to ask for a hostname, a message and place them in string variables as host and msg...
No I know thats an error from net, but if you take a look at the second net command, it is trying to use the second param i passed in msg as the hostname. Thats my point, it only lets me send a...
Hmm Ok, I've got another slight problem when I pass more than one parameter to msg, here's what the code looks like:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int count;
Wow cool that makes a lot of sense, thanks a heap for you're time typing all the comments up, really helps understand what I'm doing wrong. I totally missed the %d and %s
I always thought I needed...
Hey, I'm trying to make a simple net send application with no GUI. The program basically asks for the hostname, the message, then proceeds with filling out the information which is needed for the...