Click here to Skip to main content
12,999,833 members (48,780 online)
Rate this:
Please Sign up or sign in to vote.
See more:
How I can present J into C++ programe for this equation
Z=R*(X_l+X_c )j
j wich is mean the imaginary part ( complex number )
Posted 9-Apr-13 5:15am
Updated 9-Apr-13 5:17am
What do you mean by "present"? Just using the arithmetic of complex numbers, or some "fancy" presentation on screen?
Traditionally, imaginary part is indicated by imaginary unit denoted "i", not "j"...
OriginalGriff 9-Apr-13 11:26am
Not necessarily: "In the disciplines of electrical engineering and control systems engineering, the imaginary unit is often denoted by j instead of i, because i is commonly used to denote electric current in these disciplines."
It may be the OP is from an engineering background.
I don't say necessarily, of course...
OriginalGriff 9-Apr-13 11:38am
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
Matt T Heffron 9-Apr-13 13:40pm
You can't represent complex numbers with the notation you've shown.
Just like you need the * to represent multiplication (e.g., instead of "3b" for "3 times b", you must use "3*b"), you will need a different notation for complex numbers.
The link that Richard provided (Solution 1) has the documentation of a standard implementation for complex numbers in c++.
This is what you'll need to use.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could easily do this[^].
CPallini 9-Apr-13 13:43pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 9 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100