test3.cpp

来自「作了个小程序」· C++ 代码 · 共 38 行

CPP
38
字号
// Test3.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Afx.h"
#include "iostream.h"
#include "windows.h"
struct Person
{
//	CString str;
	char Name[20];
	int gender;
	int age;
    Person()
	{
		strcpy(Name,"123");
		gender = 0;
		age=23;
//		str="";
	}
};
int main(int argc, char* argv[])
{
///	int a = 6;
//	int *p = &a;
//	int **pp= &p;
//	int addr =(int) &pp;
//   cout<<a<<*p<<**pp<<endl;
//	printf("Hello World!\n");
	Person song;
	song.age=24;
	song.gender = 1;
//	song.str = "888888";
    WritePrivateProfileStruct("我的信息","个人信息",&song,sizeof(Person),".\\1.ini");
	return 0;
}

⌨️ 快捷键说明

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