Register for your free account! | Forgot your password?

You last visited: Today at 23:19

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



for each Frage

Discussion on for each Frage within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1

 
elite*gold: 353
Join Date: Jan 2013
Posts: 924
Received Thanks: 617
for each Frage

Tag,

wie heißt die for each schleife in vs03 ?

Lg
Kiseku is offline  
Old 08/30/2014, 12:13   #2
TBM Head Mod

 
Icetea's Avatar
 
elite*gold: 28
Join Date: Oct 2012
Posts: 27,411
Received Thanks: 2,253
Eine foreach Schleife gibt gibt es in C++ erst seit C++11. Deshalb bin ich mir nicht sicher ob Visual Studio 2003 eine solche Schleife schon unterstützt. Ich tendiere zu einem Nein, da C++11 am 12. August 2011 erschien.

Aber google das lieber noch einmal ich habe gerade nur Artikel überfllogen und deshalb rate ich dir nochmal selbst nachzuschauen oder auf weitere Antworten zu warten. Die Google-Suche zeigt genug Resultate

Liebe Grüße,
Icetea'
Icetea is offline  
Old 08/30/2014, 12:28   #3
 
xTwiLightx's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,741
Received Thanks: 1,674
Quote:
Originally Posted by Arcitc™ View Post
Tag,

wie heißt die for each schleife in vs03 ?

Lg
Die Frage sollte nicht heißen, wie eine IDE eine Schleife nennt, sondern ob die Programmiersprache (C++) foreach Schleifen unterstützt.

Icetea hat das ganze bereits beantwortet - erst seit C++ 11 gibt es ein Equivalent in C++, bei Visual C++ (Microsofts Interpretation) seit 2012:

Code:
int main()
{
  int myint[] = {1,2,3,4,5};
 
  for (int &i: myint)
  {
    std::cout << i << std::endl;
  }
}
xTwiLightx is offline  
Old 08/30/2014, 13:52   #4

 
elite*gold: 353
Join Date: Jan 2013
Posts: 924
Received Thanks: 617
andere frage wie schreibe ich diese Funktion dann um ?
Code:
						for each( PetfilterProp prop in prj.m_aPetfilterProp )
						{
							if( prop.dwID == pItem->GetProp()->dwID )
							{
								b1 = TRUE;
								break;
							}
						}
Kiseku is offline  
Old 08/30/2014, 14:11   #5



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
Sieht aus als ob das aus meiner Source wäre

Code:
for (int i = 0; i < prj.m_aPetfilterProp.size(); i++)
{
	PetfilterProp prop = prj.m_aPetfilterProp[i];
	if( prop.dwID == pItem->GetProp()->dwID )
	{
		b1 = TRUE;
		break;
	}
}
Sedrika is offline  
Thanks
2 Users
Reply




All times are GMT +1. The time now is 23:20.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.