⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fig16_25.cpp

📁 经典vc教程的例子程序
💻 CPP
字号:
// Fig. 16.25: fig16_25.cpp
// Using strtol
#include <iostream.h>
#include <stdlib.h>

int main()
{
   long x;
   char *string = "-1234567abc", *remainderPtr;

   x = strtol( string, &remainderPtr, 0 );
   cout << "The original string is \"" << string
        << "\"\nThe converted value is " << x
        << "\nThe remainder of the original string is \""
        << remainderPtr
        << "\"\nThe converted value plus 567 is " 
        << x + 567 << endl;
   return 0;
}

⌨️ 快捷键说明

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