Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8243539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:33:28+00:00 2026-06-07T21:33:28+00:00

This is the link I have that contains a big list of data which

  • 0

This is the link I have that contains a big list of data which has the format:

” X = MapNumber : Y = MapName ”

example

” 10000: Mushroom Park “.

In vc++ .net I would want to code a function that connects to that link, searches for a number within the data (let’s say 10000) and then gets the name beside the number (which would be Mushroom Park) and then put’s the name into a string.

The code below is what I have already and would work if all the data was inside a .txt file but I would like to convert this code into connecting to the link above and finally making it more efficient.

Thanks.

String^ GrabMapNameById(String^ CurrentStr)//Current Map String{
if(CurrentMapIDRead.ToString() != CurrentMapID.ToString()) //If map has chnaged
{
       try //Try streaming text
       {
          String^ Maps = "Strife.Maps";//map File Name
          StreamReader^ MapDin = File::OpenText("Strife.Maps");//Stream Declar

          String^ str;
          string s;
          int count = 0;
          while ((str = MapDin->ReadLine()) != nullptr) //Loop for every line
          {
             if(str->Contains(CurrentMapID.ToString())) //Untill Map id found
             {
                CurrentMapIDRead = CurrentMapID; //Set Current Map Name
                CurrentStr = str->Replace(CurrentMapIDRead.ToString() , "" );//Replace map id with null characters
                CurrentStr = CurrentStr->Replace(" =" , "" ); //Take out = characters
                break;// kill while
             }
          }
       }

           catch (Exception^ e)
           {
           }
}return CurrentStr;}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:33:31+00:00Added an answer on June 7, 2026 at 9:33 pm

    I haven’t worked with vc++ before, but I believe you’re looking for the WebRequest class to get the data. Microsoft has a tutorial on making such a request. It uses a stream reader so the code inside the try block would look something like this:

    String *sURL = S"http://pastebin.com/raw.php?i=yVyxkWFD";
    WebRequest *wrGETURL;
    wrGETURL = WebRequest::Create(sURL);
    WebProxy *myProxy = new WebProxy(S"myproxy", 80);
    myProxy->BypassProxyOnLocal = true;
    
    wrGETURL->Proxy = WebProxy::GetDefaultProxy();
    
    Stream *objStream = wrGETURL->GetResponse()->GetResponseStream();
    
    StreamReader *MapDin = new StreamReader(objStream);
    
    String^ str;
    string s;
    int count = 0;
    while ((str = MapDin->ReadLine()) != nullptr) //Loop for every line
    {
         if(str->Contains(CurrentMapID.ToString())) //Untill Map id found
         {
             CurrentMapIDRead = CurrentMapID; //Set Current Map Name
             CurrentStr = str->Replace(CurrentMapIDRead.ToString() , "" );//Replace map id with null characters
             CurrentStr = CurrentStr->Replace(" =" , "" ); //Take out = characters
             break;// kill while
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that contains a link like this: <a href= onclick=add()>new user
I have a popup php page that contains this link within the php file
I have a string variable that contains the following html data: <p> <em><strong>This is
I have link that calls a function when clicked: <a href=javascript:spawnMenu(this); id=link1>Test1</a> To make
Similar to this question: link However I have already mastered that. My problem is
I have a link that looks like this: <a onclick=myLightbox rel=lightbox href=image.jpg title=> I
I have a ChildWindow. In this childwindow, I have added properties that link to
I have this line below that shows a link to go the next page
I have a simple GAE app that includes a login/logout link. This app is
I have this link which i need to translate in a php variable. http://www.facebook.com/dialog/apprequests?app_id=346824075388300&to=1149862205&message=Facebook+Dialogs+are+so+easy%21&redirect_uri=http%3A%2F%2Fpenelope-ns.net%2Ffb%2F

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.