TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 227 subscribers
Post #23969 20
Can someone explain this

So im doing Socket programing in C using winsoc2 and im donw with my server-socket now im programing my client-socket but i dont get this :

\#define DEFAULT_PORT "27015"



// Resolve the server address and port

iResult = getaddrinfo(argv[1\], DEFAULT_PORT, &hints, &result);

if (iResult != 0) {

printf("getaddrinfo failed: %d\\n", iResult);

WSACleanup();

return 1;

}

https://redd.it/1nx5arl
@r_cpp
Reddit From the cpp community on Reddit Explore this post and more from the cpp community
More from @r_cpp
  1. Oct 17, 2026The Double Headed Stack Allocator – The blog at the bottom of the sea https://blog.demofox…
  2. Oct 17, 2026Barry's C++ Blog - Generating Operator Functions https://brevzin.github.io/c++/2026/10/14/…
  3. Oct 17, 2026MSVC Build Tools Version 14.52 Release Candidate Now Available https://devblogs.microsoft.…
  4. Oct 17, 2026C++ futures part 4: What if I want an immediate on-thread std::async? https://devblogs.mic…
  5. Oct 14, 2026I tested whether a coding agent would use C++23 ranges without being told Blog post: https…
  6. Oct 14, 2026C++ futures part 1: The mental model https://devblogs.microsoft.com/oldnewthing/20261012-0…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →