This pseudo code does 'not' work in a visual studio environment.
In this scenario, line 22 and 25 are undefined because they cannot access the definition in main() even though it is defined.
#include <iostream>
using namespace std;
namespace N{
public ref classForm1 : publicSystem::Forms::Form
{
public:
Form1(string laArray[], int length)
{
InitializeComponent();
//constructor code
}
private:
System::VoidB() {
LoadMyFile (laArray, 2);
}
public:
void PrintArray(string laArray[], int length)
{
string fileName1;
fileName1 = laArray[0];
}
}
};
int main(array<System::String^>^args)
{
std::string laArray[2];
laArray[0] ="hello";
laArray[1] ="bye";
PrintArray(laArray,2);
return0;
Application::Run(gcnew Form1(laArray, 2));
}
Actual error and code:
http://pastie.org/4783179
form1
http://pastie.org/4783166
main()
http://pastie.org/4783187
All I am trying to do is display array data produced in main() inside of a textbox window in my form1.
I cannot seem to connect laArray[] in main() with laArray[] in form1