C++程序输出三个数最大的一个,请错把大神当废材帮看下我写的错在哪。

求助大神帮忙看一下这个C++程序哪错了-中国学网-中国IT综合门户网站-提供健康,养生,留学,移民,创业,汽车等信息
> 信息中心 >
求助大神帮忙看一下这个C++程序哪错了
来源:互联网 发表时间: 12:28:19 责任编辑:李志喜字体:
为了帮助网友解决“求助大神帮忙看一下这个C++程序哪错了”相关的问题,中国学网通过互联网对“求助大神帮忙看一下这个C++程序哪错了”相关的解决方案进行了整理,用户详细问题包括:void tj(char c[100]),i; }error C2447;=&#39、数字。#include&
else if(c[i]&gt,n=0; 'A&#39,n编写一函数;a&#39?)编译器总是出现这个;
if((c[i]&)
n++;=&#39,k,别输出什么提示信息;a[i];&&c[i]&iostream&))
z++;}int main(){ char a[100];)
break,什么意思; for(i=0;)
k++;i++) { if(c[i]=='{ int z=0;,统计此字符串中字母;)||(c[i]&
else if(c[i]=='&#92,k=0;0'9' tj( a);&gt,由实参传来一个字符串;0'n&#39,k=0;a;='='&&c[i]&lt,在主函数中输入字符串以及输出上述结果;&&c[i]&Z'&#92,f;='z'
} cin& return 0;=&#39?该怎么改、空格和其它字符的个数。 只要结果: missing function header (old-
else f++!&#39,具体解决方案如下:解决方案1:
/&#47void tj(char c[100]); &#47
提问者评价
解决方案2:
你这个程序错误的太多了,何止一个错误啊?建议你多看看书吧
解决方案3:
void tj(char c[100]); 分号是什么情况
1个回答5个回答2个回答2个回答3个回答3个回答1个回答2个回答2个回答
相关文章:
最新添加资讯
24小时热门资讯
Copyright © 2004- All Rights Reserved. 中国学网 版权所有
京ICP备号-1 京公网安备02号想请大神帮我编一个c++程序_百度知道
想请大神帮我编一个c++程序
模板等的应用:(1)类的设计: 尽可能多的实现面向对象程序设计的特点;(4)构造函数和析构函数的实现、友元;(6)其他特性如静态成员;(2)封装的实现;(5)对象的应用:(3)多态性的方法编程要求
尽量满足前四五个就行
我有更好的答案
cout&2;&&mid+1&&&endl,2;&
int minsize = 0;&&&&key& maxsize &&&&
mid = (minsize + maxsize)/&
while(minsize & key)
maxsize = mid -1;没有此数&&个数&quot,int key) {
bool bFlag =&&是第&是第&&
bFlag =没有此数&
int maxsize =&
} } void sequentialsearch(int a[]; i++)
if (a[i] == key)
cout&个数&&
for (int i = 0;
if (bFlag)
cout&&&&lt!= a[mid])
if (a[mid] &gt,int key) {
int mid = size/&i+1&i&&
minsize = mid +1;&&key&ltvoid binarysearch(int a[],int size
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁请大神看一下我这个程序有什么问题_c++吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:232,671贴子:
请大神看一下我这个程序有什么问题收藏
#pragma oncenamespace My88 {using namespace Susing namespace System::ComponentMusing namespace System::Cusing namespace System::Windows::Fusing namespace System::Dusing namespace System::Dusing namespace System::IO;/// &summary&/// Form1 摘要/// &/summary&public ref class Form1 : public System::Windows::Forms::Form{public:Form1(void){InitializeComponent();////TODO: 在此处添加构造函数代码//}protected:/// &summary&/// 清理所有正在使用的资源。/// &/summary&~Form1(){if (components){}}private: System::Windows::Forms::MenuStrip^
menuStrip1;protected: private: System::Windows::Forms::ToolStripMenuItem^
文件ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
新建ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
打开ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
保存ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
退出ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
编辑ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
撤销ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
剪切ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
复制ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
粘贴ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
查找ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
替换ToolStripMenuIprivate: System::Windows::Forms::ToolStripMenuItem^
清除ToolStripMenuIprivate: System::Windows::Forms::Label^
label1;private: System::Windows::Forms::Label^
label2;private: System::Windows::Forms::Label^
label3;private: System::Windows::Forms::Label^
label4;private: System::Windows::Forms::TextBox^
textBox1;private: System::Windows::Forms::ComboBox^
comboBox1;private: System::Windows::Forms::GroupBox^
groupBox1;private: System::Windows::Forms::RadioButton^
radioButton1;private: System::Windows::Forms::GroupBox^
groupBox2;private: System::Windows::Forms::RadioButton^
radioButton3;private: System::Windows::Forms::RadioButton^
radioButton2;private: System::Windows::Forms::CheckBox^
checkBox3;private: System::Windows::Forms::CheckBox^
checkBox2;private: System::Windows::Forms::CheckBox^
checkBox1;private: System::Windows::Forms::RichTextBox^
richTextBox1;private: System::Windows::Forms::ListBox^
listBox1;private: System::Windows::Forms::OpenFileDialog^
openFileDialog1;private: System::Windows::Forms::SaveFileDialog^
saveFileDialog1;private:/// &summary&/// 必需的设计器变量。/// &/summary&System::ComponentModel::Container ^#pragma region Windows Form Designer generated code/// &summary&/// 设计器支持所需的方法 - 不要/// 使用代码编辑器修改此方法的内容。/// &/summary&void InitializeComponent(void){this-&menuStrip1 = (gcnew System::Windows::Forms::MenuStrip());this-&文件ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&新建ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&打开ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&保存ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&退出ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&编辑ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&撤销ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&剪切ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&复制ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&粘贴ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&查找ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&替换ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&清除ToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());this-&label1 = (gcnew System::Windows::Forms::Label());this-&label2 = (gcnew System::Windows::Forms::Label());this-&label3 = (gcnew System::Windows::Forms::Label());this-&label4 = (gcnew System::Windows::Forms::Label());this-&textBox1 = (gcnew System::Windows::Forms::TextBox());this-&comboBox1 = (gcnew System::Windows::Forms::ComboBox());this-&groupBox1 = (gcnew System::Windows::Forms::GroupBox());this-&radioButton3 = (gcnew System::Windows::Forms::RadioButton());this-&radioButton2 = (gcnew System::Windows::Forms::RadioButton());this-&radioButton1 = (gcnew System::Windows::Forms::RadioButton());this-&groupBox2 = (gcnew System::Windows::Forms::GroupBox());this-&checkBox3 = (gcnew System::Windows::Forms::CheckBox());this-&checkBox2 = (gcnew System::Windows::Forms::CheckBox());this-&checkBox1 = (gcnew System::Windows::Forms::CheckBox());this-&richTextBox1 = (gcnew System::Windows::Forms::RichTextBox());this-&listBox1 = (gcnew System::Windows::Forms::ListBox());this-&openFileDialog1 = (gcnew System::Windows::Forms::OpenFileDialog());this-&saveFileDialog1 = (gcnew System::Windows::Forms::SaveFileDialog());this-&menuStrip1-&SuspendLayout();this-&groupBox1-&SuspendLayout();this-&groupBox2-&SuspendLayout();this-&SuspendLayout();// // menuStrip1// this-&menuStrip1-&Items-&AddRange(gcnew cli::array& System::Windows::Forms::ToolStripItem^
&(2) {this-&文件ToolStripMenuItem, this-&编辑ToolStripMenuItem});this-&menuStrip1-&Location = System::Drawing::Point(0, 0);this-&menuStrip1-&Name = L&menuStrip1&;this-&menuStrip1-&Size = System::Drawing::Size(317, 25);this-&menuStrip1-&TabIndex = 0;this-&menuStrip1-&Text = L&menuStrip1&;// // 文件ToolStripMenuItem// this-&文件ToolStripMenuItem-&DropDownItems-&AddRange(gcnew cli::array& System::Windows::Forms::ToolStripItem^
&(4) {this-&新建ToolStripMenuItem, this-&打开ToolStripMenuItem, this-&保存ToolStripMenuItem, this-&退出ToolStripMenuItem});this-&文件ToolStripMenuItem-&Name = L&文件ToolStripMenuItem&;this-&文件ToolStripMenuItem-&Size = System::Drawing::Size(44, 21);this-&文件ToolStripMenuItem-&Text = L&文件&;// // 新建ToolStripMenuItem// this-&新建ToolStripMenuItem-&Name = L&新建ToolStripMenuItem&;this-&新建ToolStripMenuItem-&ShortcutKeys = static_cast&System::Windows::Forms::Keys&((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::N));this-&新建ToolStripMenuItem-&Size = System::Drawing::Size(147, 22);this-&新建ToolStripMenuItem-&Text = L&新建&;this-&新建ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::新建ToolStripMenuItem_Click);// // 打开ToolStripMenuItem// this-&打开ToolStripMenuItem-&Name = L&打开ToolStripMenuItem&;this-&打开ToolStripMenuItem-&ShortcutKeys = static_cast&System::Windows::Forms::Keys&((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::O));this-&打开ToolStripMenuItem-&Size = System::Drawing::Size(147, 22);this-&打开ToolStripMenuItem-&Text = L&打开&;this-&打开ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::打开ToolStripMenuItem_Click);// // 保存ToolStripMenuItem// this-&保存ToolStripMenuItem-&Name = L&保存ToolStripMenuItem&;this-&保存ToolStripMenuItem-&ShortcutKeys = static_cast&System::Windows::Forms::Keys&((System::Windows::Forms::Keys::Control | System::Windows::Forms::Keys::S));this-&保存ToolStripMenuItem-&Size = System::Drawing::Size(147, 22);this-&保存ToolStripMenuItem-&Text = L&保存&;this-&保存ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::保存ToolStripMenuItem_Click);// // 退出ToolStripMenuItem// this-&退出ToolStripMenuItem-&Name = L&退出ToolStripMenuItem&;this-&退出ToolStripMenuItem-&Size = System::Drawing::Size(147, 22);this-&退出ToolStripMenuItem-&Text = L&退出&;this-&退出ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::退出ToolStripMenuItem_Click);// // 编辑ToolStripMenuItem// this-&编辑ToolStripMenuItem-&DropDownItems-&AddRange(gcnew cli::array& System::Windows::Forms::ToolStripItem^
&(7) {this-&撤销ToolStripMenuItem, this-&剪切ToolStripMenuItem, this-&复制ToolStripMenuItem, this-&粘贴ToolStripMenuItem, this-&查找ToolStripMenuItem, this-&替换ToolStripMenuItem, this-&清除ToolStripMenuItem});this-&编辑ToolStripMenuItem-&Name = L&编辑ToolStripMenuItem&;this-&编辑ToolStripMenuItem-&Size = System::Drawing::Size(44, 21);this-&编辑ToolStripMenuItem-&Text = L&编辑&;// // 撤销ToolStripMenuItem// this-&撤销ToolStripMenuItem-&Name = L&撤销ToolStripMenuItem&;this-&撤销ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&撤销ToolStripMenuItem-&Text = L&撤销&;this-&撤销ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::撤销ToolStripMenuItem_Click);// // 剪切ToolStripMenuItem// this-&剪切ToolStripMenuItem-&Name = L&剪切ToolStripMenuItem&;this-&剪切ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&剪切ToolStripMenuItem-&Text = L&剪切&;this-&剪切ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::剪切ToolStripMenuItem_Click);// // 复制ToolStripMenuItem// this-&复制ToolStripMenuItem-&Name = L&复制ToolStripMenuItem&;this-&复制ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&复制ToolStripMenuItem-&Text = L&复制&;this-&复制ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::复制ToolStripMenuItem_Click);// // 粘贴ToolStripMenuItem// this-&粘贴ToolStripMenuItem-&Name = L&粘贴ToolStripMenuItem&;this-&粘贴ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&粘贴ToolStripMenuItem-&Text = L&粘贴&;this-&粘贴ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::粘贴ToolStripMenuItem_Click);// // 查找ToolStripMenuItem// this-&查找ToolStripMenuItem-&Name = L&查找ToolStripMenuItem&;this-&查找ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&查找ToolStripMenuItem-&Text = L&查找&;this-&查找ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::查找ToolStripMenuItem_Click);// // 替换ToolStripMenuItem// this-&替换ToolStripMenuItem-&Name = L&替换ToolStripMenuItem&;this-&替换ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&替换ToolStripMenuItem-&Text = L&替换&;this-&替换ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::替换ToolStripMenuItem_Click);// // 清除ToolStripMenuItem// this-&清除ToolStripMenuItem-&Name = L&清除ToolStripMenuItem&;this-&清除ToolStripMenuItem-&Size = System::Drawing::Size(100, 22);this-&清除ToolStripMenuItem-&Text = L&清除&;this-&清除ToolStripMenuItem-&Click += gcnew System::EventHandler(this, &Form1::清除ToolStripMenuItem_Click);// // label1// this-&label1-&AutoSize =this-&label1-&Location = System::Drawing::Point(12, 42);this-&label1-&Name = L&label1&;this-&label1-&Size = System::Drawing::Size(47, 12);this-&label1-&TabIndex = 1;this-&label1-&Text = L&姓名 :&;// // label2// this-&label2-&AutoSize =this-&label2-&Location = System::Drawing::Point(142, 43);this-&label2-&Name = L&label2&;this-&label2-&Size = System::Drawing::Size(41, 12);this-&label2-&TabIndex = 2;this-&label2-&Text = L&性别:&;// // label3// this-&label3-&AutoSize =this-&label3-&Location = System::Drawing::Point(181, 129);this-&label3-&Name = L&label3&;this-&label3-&Size = System::Drawing::Size(41, 12);this-&label3-&TabIndex = 3;this-&label3-&Text = L&简介:&;// // label4// this-&label4-&AutoSize =this-&label4-&Location = System::Drawing::Point(239, 129);this-&label4-&Name = L&label4&;this-&label4-&Size = System::Drawing::Size(41, 12);this-&label4-&TabIndex = 4;this-&label4-&Text = L&专业:&;// // textBox1// this-&textBox1-&Location = System::Drawing::Point(60, 39);this-&textBox1-&Name = L&textBox1&;this-&textBox1-&Size = System::Drawing::Size(76, 21);this-&textBox1-&TabIndex = 5;this-&textBox1-&KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::textBox1_KeyPress);// // comboBox1// this-&comboBox1-&FormattingEnabled =this-&comboBox1-&Items-&AddRange(gcnew cli::array& System::Object^
&(2) {L&男&, L&女&});this-&comboBox1-&Location = System::Drawing::Point(183, 40);this-&comboBox1-&Name = L&comboBox1&;this-&comboBox1-&Size = System::Drawing::Size(97, 20);this-&comboBox1-&TabIndex = 6;this-&comboBox1-&Text = L&男或女&;this-&comboBox1-&SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);this-&comboBox1-&KeyPress += gcnew System::Windows::Forms::KeyPressEventHandler(this, &Form1::comboBox1_KeyPress);// // groupBox1// this-&groupBox1-&Controls-&Add(this-&radioButton3);this-&groupBox1-&Controls-&Add(this-&radioButton2);this-&groupBox1-&Controls-&Add(this-&radioButton1);this-&groupBox1-&Location = System::Drawing::Point(12, 144);this-&groupBox1-&Name = L&groupBox1&;this-&groupBox1-&Size = System::Drawing::Size(73, 100);this-&groupBox1-&TabIndex = 7;this-&groupBox1-&TabStop =this-&groupBox1-&Text = L&学位:&;// // radioButton3// this-&radioButton3-&AutoSize =this-&radioButton3-&Location = System::Drawing::Point(2, 78);this-&radioButton3-&Name = L&radioButton3&;this-&radioButton3-&Size = System::Drawing::Size(47, 16);this-&radioButton3-&TabIndex = 2;this-&radioButton3-&Text = L&博士&;this-&radioButton3-&UseVisualStyleBackColor =this-&radioButton3-&CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton3_CheckedChanged);// // radioButton2// this-&radioButton2-&AutoSize =this-&radioButton2-&Location = System::Drawing::Point(2, 45);this-&radioButton2-&Name = L&radioButton2&;this-&radioButton2-&Size = System::Drawing::Size(47, 16);this-&radioButton2-&TabIndex = 1;this-&radioButton2-&Text = L&硕士&;this-&radioButton2-&UseVisualStyleBackColor =this-&radioButton2-&CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton2_CheckedChanged);// // radioButton1// this-&radioButton1-&AutoSize =this-&radioButton1-&Location = System::Drawing::Point(2, 11);this-&radioButton1-&Name = L&radioButton1&;this-&radioButton1-&Size = System::Drawing::Size(47, 16);this-&radioButton1-&TabIndex = 0;this-&radioButton1-&Text = L&本科&;this-&radioButton1-&UseVisualStyleBackColor =this-&radioButton1-&CheckedChanged += gcnew System::EventHandler(this, &Form1::radioButton1_CheckedChanged);// // groupBox2// this-&groupBox2-&Controls-&Add(this-&checkBox3);this-&groupBox2-&Controls-&Add(this-&checkBox2);this-&groupBox2-&Controls-&Add(this-&checkBox1);this-&groupBox2-&Location = System::Drawing::Point(92, 144);this-&groupBox2-&Name = L&groupBox2&;this-&groupBox2-&Size = System::Drawing::Size(73, 100);this-&groupBox2-&TabIndex = 8;this-&groupBox2-&TabStop =this-&groupBox2-&Text = L&爱好:&;// // checkBox3// this-&checkBox3-&AutoSize =this-&checkBox3-&Location = System::Drawing::Point(0, 78);this-&checkBox3-&Name = L&checkBox3&;this-&checkBox3-&Size = System::Drawing::Size(78, 16);this-&checkBox3-&TabIndex = 2;this-&checkBox3-&Text = L&打羽毛球 &;this-&checkBox3-&UseVisualStyleBackColor =this-&checkBox3-&CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox3_CheckedChanged);// // checkBox2// this-&checkBox2-&AutoSize =this-&checkBox2-&Location = System::Drawing::Point(0, 45);this-&checkBox2-&Name = L&checkBox2&;this-&checkBox2-&Size = System::Drawing::Size(48, 16);this-&checkBox2-&TabIndex = 1;this-&checkBox2-&Text = L&旅游&;this-&checkBox2-&UseVisualStyleBackColor =this-&checkBox2-&CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox2_CheckedChanged);// // checkBox1// this-&checkBox1-&AutoSize =this-&checkBox1-&Location = System::Drawing::Point(0, 11);this-&checkBox1-&Name = L&checkBox1&;this-&checkBox1-&Size = System::Drawing::Size(48, 16);this-&checkBox1-&TabIndex = 0;this-&checkBox1-&Text = L&游泳&;this-&checkBox1-&UseVisualStyleBackColor =this-&checkBox1-&CheckedChanged += gcnew System::EventHandler(this, &Form1::checkBox1_CheckedChanged);// // richTextBox1// this-&richTextBox1-&Location = System::Drawing::Point(171, 153);this-&richTextBox1-&Name = L&richTextBox1&;this-&richTextBox1-&Size = System::Drawing::Size(66, 91);this-&richTextBox1-&TabIndex = 9;this-&richTextBox1-&Text = L&&;// // listBox1// this-&listBox1-&FormattingEnabled =this-&listBox1-&ItemHeight = 12;this-&listBox1-&Items-&AddRange(gcnew cli::array& System::Object^
&(5) {L&网络工程&, L&计算机应用&, L&电子信息&, L&电子信息科学与技术&, L&通信工程&});this-&listBox1-&Location = System::Drawing::Point(244, 157);this-&listBox1-&Name = L&listBox1&;this-&listBox1-&Size = System::Drawing::Size(69, 88);this-&listBox1-&TabIndex = 10;// // openFileDialog1// this-&openFileDialog1-&FileName = L&openFileDialog1&;// // Form1// this-&AutoScaleDimensions = System::Drawing::SizeF(6, 12);this-&AutoScaleMode = System::Windows::Forms::AutoScaleMode::Fthis-&ClientSize = System::Drawing::Size(317, 261);this-&Controls-&Add(this-&listBox1);this-&Controls-&Add(this-&richTextBox1);this-&Controls-&Add(this-&groupBox2);this-&Controls-&Add(this-&groupBox1);this-&Controls-&Add(this-&comboBox1);this-&Controls-&Add(this-&textBox1);this-&Controls-&Add(this-&label4);this-&Controls-&Add(this-&label3);this-&Controls-&Add(this-&label2);this-&Controls-&Add(this-&label1);this-&Controls-&Add(this-&menuStrip1);this-&MainMenuStrip = this-&menuStrip1;this-&Name = L&Form1&;this-&Text = L&个人信息&;this-&Load += gcnew System::EventHandler(this, &Form1::Form1_Load);this-&menuStrip1-&ResumeLayout(false);this-&menuStrip1-&PerformLayout();this-&groupBox1-&ResumeLayout(false);this-&groupBox1-&PerformLayout();this-&groupBox2-&ResumeLayout(false);this-&groupBox2-&PerformLayout();this-&ResumeLayout(false);this-&PerformLayout();}#pragma endregionprivate: System::Void 新建NToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {}private: System::Void radioButton1_CheckedChanged(System::Object^
sender, System::EventArgs^
e) {if(radioButton1-&Checked==true)richTextBox1-&Text+=&学位:&+radioButton1-&Text+&\n&;}private: System::Void radioButton2_CheckedChanged(System::Object^
sender, System::EventArgs^
e) { if(radioButton2-&Checked==true)richTextBox1-&Text+=&学位:&+radioButton2-&Text+&\n&;}private: System::Void radioButton3_CheckedChanged(System::Object^
sender, System::EventArgs^
e) { if(radioButton3-&Checked==true)richTextBox1-&Text+=&学位:&+radioButton3-&Text+&\n&;}private: System::Void textBox1_KeyPress(System::Object^
sender, System::Windows::Forms::KeyPressEventArgs^
e) {if(e-&KeyChar==13)richTextBox1-&Text+=&姓名:&+textBox1-&Text+&\n&;}private: System::Void Form1_Load(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Clear();}private: System::Void 清除ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Clear();}private: System::Void comboBox1_KeyPress(System::Object^
sender, System::Windows::Forms::KeyPressEventArgs^
e) {if((e-&KeyChar==13)&&comboBox1-&Text!=&&)richTextBox1-&Text+=&性别:&+comboBox1-&Text+&\n&;}private: System::Void checkBox1_CheckedChanged(System::Object^
sender, System::EventArgs^
e) {if(checkBox1-&Checked==true)richTextBox1-&Text+=&爱好:&+checkBox1-&Text+&\n&;}private: System::Void checkBox2_CheckedChanged(System::Object^
sender, System::EventArgs^
e) {if(checkBox2-&Checked==true)richTextBox1-&Text+=&爱好:&+checkBox2-&Text+&\n&;}private: System::Void checkBox3_CheckedChanged(System::Object^
sender, System::EventArgs^
e) {if(checkBox3-&Checked==true)richTextBox1-&Text+=&爱好&+checkBox3-&Text+&\n&;}private: System::Void comboBox1_SelectedIndexChanged(System::Object^
sender, System::EventArgs^
e) { richTextBox1-&Text+=&性别:&+comboBox1-&Text+&\n&;}//private: System::Void saveFileDialog1_FileOk(System::Object^
sender, System::ComponentModel::CancelEventArgs^
e) {}private: System::Void 保存ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {if(saveFileDialog1-&ShowDialog()==Windows::Forms::DialogResult::OK){StreamWriter^str=File::CreateText(saveFileDialog1-&FileName);str-&Write(richTextBox1-&Text);str-&Close();}}private: System::Void 打开ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {openFileDialog1-&InitialDirectory=&f:\\vcexample\\&;openFileDialog1-&Filter=&文本文件(*.txt)|*.txt&;if(openFileDialog1-&ShowDialog()==Windows::Forms::DialogResult::OK){StreamWriter^str=File::OpenText(openFileDialog1-&FileName); richTextBox1-&Text=str-&ReadToEnd(); str-&Close();}}private: System::Void 退出ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {this-&Close();}private: System::Void 新建ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Clear();textBox1-&Clear();comboBox1-&Text=&&;}private: System::Void 复制ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Copy();}private: System::Void 粘贴ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Paste();}private: System::Void 剪切ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Cut();}private: System::Void 撤销ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {richTextBox1-&Undo();}private: System::Void 查找ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {int position=richTextBox1-&Text-&IndexOf(&爱好:&);if(position&=0)richTextBox1-&Select(position,2);}private: System::Void 替换ToolStripMenuItem_Click(System::Object^
sender, System::EventArgs^
e) {String^str1=richTextBox1-&SelectedTrichTextBox1-&SelectedText=str1-&Replace(&爱好&,&擅长&);}};}
求大神解答,吾感激不尽
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或}

我要回帖

更多关于 错把大神当废材 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信