Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Hi everybody
Re: Hi everybody [message #19056 is a reply to message #19043] Fri, 07 November 2008 23:33 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Welcome israela. Feel free to post some screenshots in the "Applications created with U++" forum section. We are a very active community so feel free to post and ask for help. Make sure you understand all about pick semantics with Upp containers and data types. If you don't then you will be wondering why you passed it to a function and it didn't copy! If you feel like contributing, there are sections for that too Very Happy .

Here's an example of pick semantics with Vector:
#include <Core/Core.h>
using namespace Upp

void Test(Vector<String> vs)
{
	Cout() << "Vector Elements in Test() function: ";
	for(int i=0;i<vs.GetCount();i++)
		 Cout() << " " << vs[i];
	Cout() << "\n";
};

CONSOLE_APP_MAIN
{
	Vector<String> vs;
	vs << "a" << "b" << "c"; //Overloaded operator in container Vector to add elements.
	
	Cout() << "Vector Elements: ";	
	for(int i=0;i<vs.GetCount();i++)
		 Cout() << " " << vs[i];
	Cout() << "\n";
	
	Test(vs); // This 'Picks' the vector out of this scope and now the function Test 'owns' it.
	
	// THIS IS GOING TO FAIL
	Cout() << "HERE COMES THE FAILURE: \n";
	for(int i=0;i<vs.GetCount();i++)
		 Cout() << " " << vs[i];
	Cout() << "\n";	
}
 
Read Message
Read Message
Previous Topic: Using .NET components
Next Topic: Looking for someone to convert a ulimate++ project to Microsoft Visual C++ project
Goto Forum:
  


Current Time: Sat Jun 01 01:22:58 CEST 2024

Total time taken to generate the page: 0.01972 seconds