摘要:
char c[] = { 'a', 'b', 'c', '\0' };char* cp = c;printf(cp);所有的char类型都以'\0'结尾 阅读全文
摘要:
longlong q = 10;char s[8];char* output;sprintf(s, "%ld", q);output = s;doubledouble d = 10;char s1[8];sprintf(s1, "%.2lf", d);stringstr.data();%.后的数字为... 阅读全文
摘要:
有一个注意要点,必须用指针,不能用A a = B()的形式。#include "stdafx.h"#include "Base.h"#include "Class2.h"int _tmain(int argc, _TCHAR* argv[]){ Base* base = new Class2(... 阅读全文