12,999,833 members (48,780 online)

Email

Password

Sign in with

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 )

Z=R*(X_l+X_c )j

j wich is mean the imaginary part ( complex number )

Comments

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

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

Traditionally, imaginary part is indicated by imaginary unit denoted "i", not "j"...

—SA

Wiki: http://en.wikipedia.org/wiki/Imaginary_unit

It may be the OP is from an engineering background.

—SA

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.

—SA

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.