Can someone do me this?

This is a discussion on Can someone do me this? within the Networking/Device Communication forums, part of the General Programming Boards category; I tried for several days, i simply cant do it... I cant learn it by myself. I'm trying to make ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    52

    Can someone do me this?

    I tried for several days, i simply cant do it... I cant learn it by myself.

    I'm trying to make a simple program in C++ to compile into a .EXE using DEV-C++

    The program will do this:

    -Connect through telnet to 127.0.0.1 at the port 8674, you can use port 23,24,25, and so on to connect.

    -Send the Authentication message "AUTH 1287".

    -Wait for the sentence "Correct! 250" that the server sends

    -Now send in each minute the next message "Show stats"
    for each (minute) send "Show stats"...


    Its a program that I have to show remote stats from other computers i have, but i need to keep it updated this way.
    I know there are better options to do what i'm doing but i would like to try this way.

    Can someone develope me a script that does that?
    Thanks!

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    >> Can someone develope me a script that does that?

    you poor thing. would you like fries with that?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    52
    Please, I know you can do that in 5 minutes, i would take 5 years :cry:

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    What have you tried?

  5. #5
    Registered User
    Join Date
    May 2008
    Posts
    52
    winsock libraries, just cant get it...

  6. #6
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    The answer is no. We don't give out full programs. We do help you with your own program. But in this case, the networking forum is more appropriate.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  7. #7
    Registered User
    Join Date
    May 2008
    Posts
    52
    Its only a tiny simple script..... oh my god...

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    395
    I know there are better options to do what i'm doing but i would like to try this way.
    As it probably could be done in 10 lines with any higher level script language, I guess your interest here is to *learn* how to do it in C?

    I cant learn it by myself. [...]Can someone develope me a script that does that?
    So actually you don't care about learning.

    Could you rephrase your problem with consistent contraints? why do it in C?

  9. #9
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    Just post the code if you have any.
    Some will be happy to dig into it and feed you with suggestions as to why it isn't working or how it should be.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > "you can use port 23,24,25, and so on to connect."

    Yer, that's not homework. You *should* be able to do it in batch.

  11. #11
    Registered User
    Join Date
    May 2008
    Posts
    52
    I wanna use C/C++ because i made this tiny prog in visual basic and it needs the Winsock.ocx file.
    In C no ocx files needed, and i only have to put the winsock.dll in the same folder as the program, no need to register it.

    i dont want to learn it, at least right now, because college takes me all the free time i had not much time ago...

    and no, this isnt any school homework or something.

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    Unfortunately, as you should know, just trying to do something in a language without experience isn't going to work.
    There's nothing wrong in having the winsock.ocx file on the target computer. Just make sure they install the VB runtime, and they'll have the winsock file.
    Btw, C/C++ also requires runtime - especially newer versions, so don't do it just because you don't want to install winsock.ocx.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    Registered User
    Join Date
    May 2008
    Posts
    52
    Quote Originally Posted by Elysia View Post
    Unfortunately, as you should know, just trying to do something in a language without experience isn't going to work.
    There's nothing wrong in having the winsock.ocx file on the target computer. Just make sure they install the VB runtime, and they'll have the winsock file.
    Btw, C/C++ also requires runtime - especially newer versions, so don't do it just because you don't want to install winsock.ocx.
    so what should i do?

  14. #14
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,985
    Why not stick to VB?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  15. #15
    Registered User
    Join Date
    May 2008
    Posts
    52
    Quote Originally Posted by Elysia View Post
    Why not stick to VB?
    ...

    Can you help me or not? Is this something against VB or something... is this some kind of religion? ....... -_-

Page 1 of 3 123 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21