摘要:
#include<iostream.h>#include<string.h>classPerson{public:Person(char*pN){cout<<"Constructing"<<pN<<endl;pName=newchar[strlen(pN)+1];if(pName!=0)strcpy(pName,pN);}~Person(...
阅读全文
posted @ 2009-06-19 21:55
icey
阅读(226)
推荐(0)
摘要:
#include<windows.h>#include<mmsystem.h>//using namespace std;int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPreInstance,PTSTR szCmdLine,int iCmdShow){//MessageBox(NULL,TEXT("hello"),"",...
阅读全文
posted @ 2009-06-19 21:11
icey
阅读(391)
推荐(0)
摘要:
//读取文件void CFileView::OnFilRead() {// TODO: Add your command handler code hereCFile file;TRY{file.Open("lm.txt",CFile::modeRead);}CATCH(CFileException , e){#ifdef _DEBUGafxDump<<"File could not ...
阅读全文
posted @ 2009-06-19 20:59
icey
阅读(231)
推荐(0)
摘要:
itoa()函数有3个参数:第一个参数是要转换的数字,第二个参数是要写入转换结果的目标字符串,第三个参数是转移数字时所用 的基数。在上例中,转换基数为10。10:十进制;2:二进制...如:# include <stdio.h># include <stdlib.h>void main (void){int num = 100;char str[25];itoa(num, ...
阅读全文
posted @ 2009-06-19 16:14
icey
阅读(669)
推荐(0)