zoukankan      html  css  js  c++  java
  • windows c语言 网络

    WORD wVersionRequested;
    WSADATA wsaData;
    int err;
    wVersionRequested = MAKEWORD(2, 2);

    err = WSAStartup(wVersionRequested, &wsaData);
    if (err != 0) {
    /* Tell the user that we couldn't find a usable */
    /* WinSock DLL. */
    return FALSE;
    }

    /* Confirm that the WinSock DLL supports 2.0.*/
    /* Note that if the DLL supports versions greater */
    /* than 2.0 in addition to 2.0, it will still return */
    /* 2.0 in wVersion since that is the version we */

    /* requested. */

    if (LOBYTE(wsaData.wVersion) != 2 ||
    HIBYTE(wsaData.wVersion) != 2) {
    /* Tell the user that we couldn't find a usable */
    /* WinSock DLL. */
    WSACleanup();
    return FALSE;
    }

    fp = fopen("E:\工作\10_hz\serv\Release\aaa.txt","r");打开文件用绝对路径或在..的worksapce的目录才可以fp = fopen("aaa.txt","r");

  • 相关阅读:
    js笔记4
    js笔记3
    js笔记2
    js笔记1
    前端笔记13
    (7)第3章的开始
    (6)第2章的尾巴~
    (5)自定义数据结构再探
    我的学习方法(6)
    (4)自定义数据结构初探
  • 原文地址:https://www.cnblogs.com/xpylovely/p/10561508.html
Copyright © 2011-2022 走看看