Создал новый проект и свой класс, но в форме не хочет объявляться переменная типа Exploer и CopyFileAndfolder (
error C2143: syntax error : missing ';' before '^' ;
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int;
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int;)
Exploer.h
using namespace System;
using namespace System::IO;
using namespace System::Windows::Forms;
using namespace System::Threading;
#include "Form1.h"
using namespace Exploer_03class;
#pragma once
ref class Exploer
{
public:
int i;
String^ FullPath;
String^ Name;
String^ extension;
__int64 size;
DirectoryInfo^ dirinf;
FileInfo^ fileinf;
array<TreeNode^>^ treenode(String^ path);
String^ back(String^ path);
array<TreeNode^>^ treenode(DirectoryInfo^ directoryinf);
array<TreeNode^>^ treenode(array<DirectoryInfo^>^ ardirinfo);
array<ListViewItem^>^ listitem(String^ path);
array<ListViewItem^>^ listitem(DirectoryInfo^ directoryinf);
void strtcopy(array<String^>^ pathout, array<String^>^ pathin);
void strmove (array<String^>^ patnout, array<String^>^ pathin);
String^ sizeofbyte(__int64 size);
Exploer(void);
};
ref class CopyFileAndfolder
{
public:
CopyFileAndfolder(void);
Thread^ thr;
int bufsize;
array<String^>^ pathout;
array<String^>^ pathin;
Form1^ form;
ProgressBar^ progresspar;
void copyfromfiletofile ( String^ pathout, String^ pathin );
void copy(String^ pathout, String^ pathin );
void copyy();
void copyfile(String^ pathout, String^ pathin);
void move(String^ pathout, String^ patnin );
void movee();
void movefile(String^ pathout, String^ pathin );
};
Form1.h
#pragma once
namespace Exploer_03class {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form1
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
private:
Exploer^ exploer;
CopyFileAndfolder^ copyfolderandfile;
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->SuspendLayout();
//
// Form1
//
this->AutoScaleDimensions = System::Drawing::SizeF(8, 16);
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->ClientSize = System::Drawing::Size(852, 394);
this->Name = L"Form1";
this->Text = L"Form1";
this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
this->ResumeLayout(false);
}
#pragma endregion
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
}
};
}
Exploer.cpp
#include "StdAfx.h"
#include "Exploer.h"
stdafx.h
#pragma once
stdafx.cpp
#include "stdafx.h"