随笔分类 -  c++ primer

学习
摘要:// chapter4.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){const size_t size = 16;int carr[size];for(int idx = 0; idx != size; ++idx){carr[idx] = idx;}return 0;}debugod0... 阅读全文
posted @ 2010-06-21 14:58 南守拥 阅读(232) 评论(0) 推荐(0)
摘要:// chapter3.3.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <bitset>using std::bitset;#include <string>using std::string;int _tmain(int argc, _TCHAR* argv[]){bitset<16> b(0xffff)... 阅读全文
posted @ 2010-06-21 14:53 南守拥 阅读(254) 评论(0) 推荐(0)
摘要:// chapter3.3.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <vector>using std::vector;int _tmain(int argc, _TCHAR* argv[]){vector<int> ivec(10);for(vector<int>::iterator iter = i... 阅读全文
posted @ 2010-06-21 11:32 南守拥 阅读(267) 评论(0) 推荐(0)
摘要:// chapter3.2.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>#include <string>using std::string;using std::cout;using std::cin;using std::endl;int _tmain(int argc, _TCHAR* arg... 阅读全文
posted @ 2010-06-21 09:59 南守拥 阅读(264) 评论(0) 推荐(0)
摘要:// chapter1.4.4.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>int _tmain(int argc, _TCHAR* argv[]){int sum = 0, value;while(std::cin>>value){sum+=value;}std::cout<<"Sum... 阅读全文
posted @ 2010-06-20 16:18 南守拥 阅读(319) 评论(0) 推荐(0)
摘要:// chapter1.4.3.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>int _tmain(int argc, _TCHAR* argv[]){std::cout<<"Enter two numbers:"<<std::endl;int v1,v2;std::cin>>v... 阅读全文
posted @ 2010-06-20 15:39 南守拥 阅读(259) 评论(0) 推荐(0)
摘要:// chapter1.4.2.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>int _tmain(int argc, _TCHAR* argv[]){int sum = 0;for(int val = 1; val <= 10; ++val){sum += val;}std::cout << ... 阅读全文
posted @ 2010-06-20 14:05 南守拥 阅读(240) 评论(0) 推荐(0)
摘要:// chapter1.4.1.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>int _tmain(int argc, _TCHAR* argv[]){int sum=0,val=1;while(val <=10){sum+=val;++val;}std::cout<<"Sum of 1 to 1... 阅读全文
posted @ 2010-06-18 17:04 南守拥 阅读(221) 评论(0) 推荐(0)
摘要:// chapter1.2.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <iostream>int _tmain(int argc, _TCHAR* argv[]){std::cout<<"Enter two numbers:"<<std::endl;int v1,v2;std::cin>>v1... 阅读全文
posted @ 2010-06-18 16:37 南守拥 阅读(261) 评论(0) 推荐(0)
摘要:#include "stdafx.h"int _tmain(int argc, _TCHAR* argv[]){return 0;}debugod00411370 55 push ebp ; main函数00411371 8BEC mov ebp, esp00411373 81EC C0000000 sub esp, 0C000411379 53 push ebx0041137A 56 push ... 阅读全文
posted @ 2010-06-18 15:07 南守拥 阅读(229) 评论(0) 推荐(0)