Help With Network Programming in C++

  • orendr7500
    6th Nov 2015 Member 0 Permalink

    (NOTE: English isn't my native language, so expect some grammer errors)

     

    why is Network Programming in C++ so .. Hard to Find a WORKING one?

    i tried searching for over a week, i couldn't find a WORKING guide for WINDOWS.
    mostly are for Linux, and the ones for Windows fail to compile.
    i tried SFML Network.hpp but there is not enough documentation about it to read and learn, so i couldn't get it to work.

    why is Network programming in C++ so hard?? 
    isn't there a NORMAL library to use?
    (yes i have tried winsock.h and WinSock2.h, both still wont work with guides, and not enough documentation about them with Windows)

    what i want to achive? a chat program where you can chat to someone online.

    or at least a simple single message program.
    What Should i do??

    Thanks.

  • jBot-42
    7th Nov 2015 Banned 0 Permalink
    This post is hidden because the user is banned
  • jenn4
    8th Nov 2015 Member 0 Permalink
    @orendr7500 (View Post)
    Are you sure the tutorials you are trying are not working, and it's not you who's doing the mistakes? I found this one from a forum where people credited it for being extremely useful. So with some knowledge in programming, common sense and google, I believe you should be able to do it. Although do note that the code does not have to compile when you just copypaste it into visual studio, the guide is a guide afterall, not a ready chat program.
  • orendr7500
    8th Nov 2015 Member 0 Permalink

    @jenn4 (View Post)

     

    yeah i know that.

    and the reason why i don't post on stack overflow is because they are bunch of Idiots.

    why can't i post questions there that people already asked? if i didn't understand something there?

    and the link that you posted me, i readed him fully, code won't compile though.

  • jenn4
    8th Nov 2015 Member 0 Permalink
    @orendr7500 (View Post)
    Do you know what one should do if their code doesn't compile? Reading the error messages and trying to fix the errors might be a good idea. If you can't fix them, you should probably ask how to fix the errors, instead of asking for someone to program your program for you.
  • mniip
    9th Nov 2015 Developer 1 Permalink
    @orendr7500 (View Post)
    Welcome to windows development. It sucks, it just does.

    Have you looked at MSDN?

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms741394%28v=vs.85%29.aspx

    You'll probably want to call these functions:
    WSAStartup
    WSASocket/socket
    WSAConnect/connect
    WSASend/WSARecv/send/recv
    WSASendDisconnect/shutdown

    EDIT: Besides, you really should learn how to ask questions. You should provide people with information about your problem. "Does not compile" is the most vague description ever. Provide a minimal example and the errors you're getting.
    Edited once by mniip. Last: 9th Nov 2015
  • CeeJayBee
    10th Nov 2015 Member 2 Permalink
    This post has been removed by jacob1: useless flaming
  • CeeJayBee2
    10th Nov 2015 Member 2 Permalink
  • jBot-42
    10th Nov 2015 Banned 0 Permalink
    This post is hidden because the user is banned
  • CeeJayBee
    10th Nov 2015 Member 1 Permalink
    @jBot-42 (View Post)
    Just pointing out that not being constructive and just saying "quickly down voted and closed" without any explanation is just being a dick.
Locked by jacob1: lock requested