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 » U++ Library support » U++ Core » Complex numbers..How to use in upp??
Re: Complex numbers..How to use in upp?? [message #33827 is a reply to message #33821] Fri, 16 September 2011 22:59 Go to previous messageGo to previous message
281264 is currently offline  281264
Messages: 272
Registered: June 2010
Location: Spain
Experienced Member
Hi,

Check complex class in C++ by including #include<complex> in your header file or .cpp file.

Here is a simple example:

// Demonstrate complex class
#include <iostream>
#include <complex>
using namespace std;

int main()
{
	complex<double> complex_01(10, 20);
	complex<double> complex_02(40, -3);
	cout << complex_01 <<endl;
	cout << complex_02 << endl;
	complex<double> complex_03 = complex_01 + complex_02;
	cout << complex_03 << endl;
	return 0;
}



Cheers,

Javier
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extend StaticText with method possible?
Next Topic: dli file for Oracle10g
Goto Forum:
  


Current Time: Sat Aug 02 12:31:37 CEST 2025

Total time taken to generate the page: 0.08466 seconds