1. When I do the richTextBox1->LoadFile("FILENAME") method, it tells me that the file I entered doesn't exist, while it really does. I'm not even sure if this is the way to load a file into the richTextBox, but I did it because that's how it worked in VB.net.
2. When I try to convert a string ("3") into an integer using System::Convert::ToInt32, it says that 'following :: must be a namespace name'. It worked at first, but all of a sudden, no matter which computer I'm on, it throws the error. While I have found an alternative solution, I want to know why this is happening.
Thanks in advance. (I put two questions in one post because this forum takes way to long to load and I didn't want to bother posting two threads.
Also, while using usingnamespace std; you may come across redefinitions. There's an already created function inside the header file you include and you've created a function of the same name.
One I can think of, off the top of my head, is count. I've seen this a few times.
One way around this, it to use std::.
i.e.
1 2 3 4 5 6 7 8 9 10
#include <iostream>
//NB: here, I'm not using using namespace std;int main()
{
std::cout << "Hello world...\n";
return 0;
}
Also, you could 'define' what you'll be using;
1 2 3 4 5 6 7 8 9 10 11
#include <iostream>
#define cout std::cout
//NB: here, I'm not using using namespace std;int main()
{
cout << "Hello world...\n";
return 0;
}
I already have the 'using namespace std;' line in my coding. But that's not really my problem...unless 'std' has something to do with the System:: namespace...but I don't know what 'std' stands for.
There is no System:: namespace in C++. If you find you're using that, you might find faster responses in a forum where the Microsoft's proprietary C++/CLI language is topical.
I'm sorry if I used the wrong term, but if I try System::, it throws that error. I don't understand what exactly the error means, why it sometimes appears (and sometimes doesn't), or how I can fix it.
EDIT: I just saw the MSDN link, but Google Chrome can't connect to MSDN no matter what I do :(