Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Question Unanswered: C++: does anyone know the code for net send?

    ive been trying to figure out what the C++ code is to use the net send command with strings. ive come up with something like this so far but the program will always use what i've typed, not whats contained in the strings when I try to put them in the parentheses.

    #include <iostream.h>
    #include <process.h>
    #include <conio.h>
    int main()
    {
    String user, message;
    cout << "Enter the user name";
    getline(cin, user);
    cout << "Enter the message";
    getline(cin, message);
    system("net send user message");
    return(0);
    }

  2. #2
    Join Date
    Feb 2004
    Location
    Sydney, Australia
    Posts
    1
    I know this post is old but if you havent found it yet, try to concatanate like so:

    system("net send " + user + " " + message);

    NB: Dont leave out the spaces within the parentheses

  3. #3
    Join Date
    Jul 2011
    Posts
    1

    Net send

    You can use WinExec for example. But using NET SEND is not secure. The command is not protected from spam: A Network Bomb. That's why it is disabled in Windows by default. I would recommend to not enable it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •