error 'Create': identifier not found
Hi guys,
I need your help as I have a problem when I tried to debugging of the application.
Here it's the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
// Form1.cpp
using namespace System::Data;
using namespace System::Drawing;
using namespace System::Net;
using namespace System::IO;
using namespace System::Text;
using namespace System::Web;
using namespace System::Runtime::InteropServices;
using namespace System::Text::RegularExpressions;
using namespace System::Configuration;
using namespace System::Collections::Generic;
#include "StdAfx.h"
#include "Form1.h"
#include "Form2.h"
using namespace MyApplication; // Of course the namespace name would be Test in your project
System::Void Form1::ListView1_DoubleClick(System::Object^ sender, System::EventArgs^ e)
{
Form2 ^form2 = dynamic_cast<Form2 ^>(Owner);
//Address of URL
String ^URL = "http://www.mysite.com/myscript.php?user=" + form2->ComboBox1->Text + "&pass=" + form2->TextBox1->Text;
HttpWebRequest ^request = safe_cast<HttpWebRequest^>(WebRequest::Create(URL));
HttpWebResponse ^response = safe_cast<HttpWebResponse^>(request->GetResponse());
StreamReader ^reader = gcnew StreamReader(response->GetResponseStream());
String ^str = reader->ReadToEnd();
}
|
The error I have got ('Create': identifier not found) is a member of a property called webRequest. The error are jumping on this line:
|
HttpWebRequest ^request = safe_cast<HttpWebRequest^>(WebRequest::Create(URL));
|
I don't know what to do.
Any idea?
Last edited on
This looks like a .NET language, so I'll take a wild guess and say it's C++.NET. This is a C++ forum, so you're unlikely to get much help.
Topic archived. No new replies allowed.