06 2021 档案
摘要:#include <iostream> using namespace std; int main(){ float a = 3.5, b = 2.2, c = 0; cout << "a = " << a << " b = " << b << " c = " << c << endl; //与运算
阅读全文
摘要:#include <iostream> using namespace std; int main() { //变量声明 char c; double x,y; //测试自增 cout<<"++E and E++ :"<<endl; c='B'; cout<<"c="<<++c<<endl; //输
阅读全文
摘要:#include <iostream> using namespace std; int main() { //定义枚举类型,并指定其枚举元素的值 enum color ; //声明枚举变量a和b,并为枚举变量a赋初值 enum color a = RED; color b; //合法,与C语言不同
阅读全文
摘要:#include<iostream>const double PI = 3.14;using namespace std; int main(){ //declare variables double r, l, s; // enter the radius of circle cout << "r
阅读全文
摘要:#include <iostream> using namespace std; int main(){ //声明Bool变量 bool flag1 = false; bool flag2 = true; //输出bool变量 cout << "False:" << false << endl; c
阅读全文
摘要:#include <iostream> #define PI 3.1416 using namespace std; int main() { int i = 100; #if 1 cout << "i = " << i << endl; #endif #ifdef PI cout << "1 PI
阅读全文
摘要:// Project18.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include<iostream> using namespace std; int main() { char Tab = '\t'; //水平制表符 cout << 1 << Tab <<
阅读全文
摘要:void ShowChar(string str) { for (int i = 0; i < str.length(); ++i) { printf("str[%d] = %c\n", i + 1,str[i]); }}
阅读全文
摘要:#pragma once#include <iostream>#include <string>#include <Windows.h>#include <fstream>#include <signal.h>#include <io.h>#include <vector>using namespa
阅读全文
摘要:void abc() { //config.ini 内容->qsprbin=C:\Program Files (x86)\QUALCOMM\QDART\bin\QSPR.exe ifstream OpenIni; OpenIni.open("config.ini", iosin | iosbinar
阅读全文
摘要:#include <stdio.h> #include #include <direct.h> #include <io.h> using namespace std; int main() { char MAC[256] = "123"; char file_01[256]; sprintf_s(
阅读全文
摘要:#include <stdio.h> ##include <stdlib.h> ##include <time.h> int main() { int n = 60; int i = 0; int t; //printf("等待的时间:"); //scanf_s("%d", &n); t = tim
阅读全文
摘要:#include using namespace std; int main() { ifstream fin("abc.txt"); ofstream fout("xyz.txt",ios::app); char data; if (!fin || !fout) return 0; while (
阅读全文
摘要:#include <iostream> #include <sstream> //使用stringstream需要引入这个头文件 using namespace std; //模板函数:将string类型变量转换为常用的数值类型(此方法具有普遍适用性) template <class Type>Ty
阅读全文
摘要:#include #include #include #include using namespace std; ; int main() { ifstream infile; infile.open("Level_offset.txt"); //将文件流对象与文件连接起来 assert(infil
阅读全文
摘要:#include #include #include #include <Windows.h> #include <stdio.h> #include <direct.h> #include <io.h> using namespace std; int main(){ std::string pr
阅读全文
摘要:#include<iostream>#include<fstream>#include<string>#include <Windows.h>#include <stdio.h>#include <stdlib.h>using namespace std; char file[256]; sprin
阅读全文
摘要:#include<iostream>#include<fstream>#include<string>#include <Windows.h>#include <stdio.h>#include <stdlib.h>using namespace std; char MAC[256] = "1234
阅读全文
摘要:#include <iostream>#include<ctime> using namespace std; int main(){ time_t tt = time(NULL); tm* t = localtime(&tt); printf("%d-%02d-%02d %02d:%02d:%02
阅读全文
摘要:with open("SFPrintLabel.txt", "w+") as myfile: myfile.write(file_line_last01) myfile.write(long_info) myfile.close()
阅读全文
摘要:#!/usr/bin/pythonimport csv NewSN = "" # find good SN 给出MAC,寻找对应的SNwith open("DIGI_MAC_28_5_2021_40units.csv", newline='') as csvfile: csv_reader = cs
阅读全文
摘要:#!/usr/bin/python import csvNewSN = ""#read last line head datawith open('SFPrintLabel.txt',"r") as file: file_content = file.readlines() #把全文档读取为一个表,
阅读全文
摘要:# coding:utf-8import codecsimport osimport os.path'''#重命名文件newlines = []fileOpen = codecs.open("SN_02.txt", "r", "UTF-8") # 打开以utf-8格式fileSave = codec
阅读全文
摘要:#pragma once#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <string>#include <Windows.h>#include <fstream>#include <sstream>#include <signa
阅读全文
摘要:#include <iostream> #include <string> #include <Windows.h> #include <fstream> #include <sstream> #include <signal.h> #include <io.h> #include <vector>
阅读全文
摘要:#include <iostream> #include <string> #include <Windows.h> #include <fstream> #include <sstream> #include <signal.h> #include <io.h> #include <vector>
阅读全文
摘要:#include<iostream>#include<fstream>#include<string>using namespace std; /* 向txt文本中写入一个字符串:若文件不存在,则新建一个文件;否则,直接输入内容*/ int main(){ ofstream os; //创建一个文件
阅读全文
摘要:#include <iostream> #include <Windows.h> #include <fstream> #include <sstream> using namespace std; int main(){ FILE * fp; int flag = 0; char * tmp; s
阅读全文
摘要:#include <iostream> using namespace std; int main(int argc, char * argv[]) { system("ipconfig > temp.txt"); return 0; }
阅读全文
摘要:#include <iostream> #include <Windows.h> using namespace std; int main() { //方法一: //system("F:\\Allen\\test\\02call-bat\\a.bat"); //方法二:WinExec是 Windo
阅读全文
摘要:#include <iostream> using namespace std; int main() { cout<<"hello world!"<<endl; system("pause"); return 0; }
阅读全文