yinyong.cpp

来自「是关于c++中关于子函数调用的」· C++ 代码 · 共 62 行

CPP
62
字号
#include <iostream.h>
/*
void main()
{ int a ;
  int &b = a ;
  a = 30;
  cout << "a = " << a << "     b = " << b << endl ;
  b = 80;
  cout << "a = " << a << "     b = " << b << endl ;
  cout << "Address Of a is " << &a << endl;
  cout << "Address Of b is " << &b << endl;
}
*/
 //指针作为函数的参数
 /*
 void swap(int *m, int *n)
 { 
	 int temp;                                
     temp = *m ; 
     *m = *n; 
     *n = temp;                             
 }

 void main()
 { 
	 int a = 5, b = 10 ;
     cout<<a<<' '<<b<<endl ;
     swap(&a, &b); 
     cout<<a<<' '<<b<<endl ;
 } 
 */

 //引用作为函数的参数
 /*
 void swap(int &m, int &n)
 { 
	 int temp;
	 temp = m ; 
     m = n; 
     n = temp;                             
 }

 void main()
 { 
	int a = 5, b = 10 ;
    cout << a <<' '<< b << endl ;
    swap(a, b); 
    cout << a <<' '<< b << endl ;
 } 
 */
#include <stdlib.h>
#include <stdio.h>

void main()
{
	char buffer[20];
	int  i = 320;
	_itoa( i, buffer, 10 );
	cout<<buffer;
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?