摘要:
先说出错原因: 堆栈调用顺序解决办法: 使用 __stdcall 或 使用C#属性CallingConvention起因是我想在c#中调用c函数结果出错了如下C 头文件 #define DLLExport extern "C" __declspec(dllexport) DLLExport i... 阅读全文
摘要:
这几天编写代码碰到 无法解析的外部符号 visual studio.在类中 inline 修饰符应该放在类函数定义的时候而不是声明的地方即// test.h 头文件class A{public: void Foo();}// test.cpp 源文件#include "test.h"inlin... 阅读全文
摘要:
在使用recvfrom 时一直没报错,像这样1 recvfrom(sock, Data, sizeof(Data), 0, (sockaddr*)&server_addr, &send_size)当我看见百度百科(坑爹)说最后两个参数可选时我就这样改了一下1 recvfrom(sock, Data,... 阅读全文
摘要:
看了看C#的运算符重载,发现与C++打不相同.刚刚被C#的自增操作符坑了,现在来分享一下.先定义一个类 class A { public int i; public A(int I) { i = I; }pub... 阅读全文
摘要:
跟上的一样,抄下来的30 - 60 ms标准的分治策略 1 #include 2 3 int A[100000], Lenght; 4 const int NegativeInfinity = -1000000; 5 6 int gLow, gHigh, gSum; 7 8 ... 阅读全文
摘要:
杭大的题,总是PE.原因:最后一行没有空行. - -|||.附上悠长的代码版本一 1 #include 2 3 int main() 4 { 5 char A[1002], B[1002], C[1002]; 6 int nA, nB, nC; 7 char *max, ... 阅读全文
摘要:
已转战浙大题目 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=2浙大acm 1002#include #include #include #include #define OPEN 1#define CASTLE 2#defin... 阅读全文
摘要:
北大的ACM 1001poj.org/problem?id=1001代码纯手动编写 - - 1 #include 2 #include 3 #include 4 5 6 class BigNumber 7 { 8 struct BigNumberNode 9 ... 阅读全文