Thread: error C3861: 'Create': identifier not found

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    40

    error C3861: '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:

    Code:
    // 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:

    Code:
    HttpWebRequest ^request = safe_cast<HttpWebRequest^>(WebRequest::Create(URL));

    I don't know what to do.

    Any idea?
    Last edited by mark103; 04-23-2011 at 08:05 AM.

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    This is not C++. This is managed C++ or C++/CLI, which do not belong in this forum. Tech board is typically the place for programming languages which has no dedicated forum. This is good to remember in the future.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 'GetUserNameEx': identifier not found error
    By shivarajbm in forum Windows Programming
    Replies: 13
    Last Post: 09-02-2010, 12:20 PM
  2. Error C3861: 'menu': identifier not found
    By blacknail in forum C++ Programming
    Replies: 6
    Last Post: 09-11-2009, 09:34 AM
  3. Replies: 1
    Last Post: 08-06-2007, 10:09 PM
  4. SHCreateDirectory: identifier not found
    By XunTric in forum Windows Programming
    Replies: 12
    Last Post: 07-31-2007, 12:57 AM
  5. GET_X_LPARAM: identifier not found
    By mrafcho001 in forum Windows Programming
    Replies: 7
    Last Post: 08-28-2005, 08:03 AM