随笔分类 - 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...
阅读全文
摘要:// 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)...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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 << ...
阅读全文
摘要:// 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...
阅读全文
摘要:// 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...
阅读全文
摘要:#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 ...
阅读全文

浙公网安备 33010602011771号