complex numbers - What is the decimal point ('.') in C++ and can I make one? -


I'm in a C ++ class, so this question will concern itself primarily with that language, though I I am not able to find any information for any other language and I feel that whatever the answer is, maybe it is a very good language.

C ++ is an integral type in unmarketed numbers ('4', for example, is an integer) The number of different bounding digits is allowed to be interpreted differently ('' 4 '', For example, a letter is '' 4 '' a string).

As far as I know, there is only one type of symbol: the decimal point. ('4.' is a double).

I would like to create a new unary mark, which prepares a constant number in the code that can be explained as a member of a built-in datatype. More original, I would like to know '.' And ',' and '' ', and' '(they are not operators, keywords, or statements, so what are they?) And how the compiler interprets / interprets them.


More information, if you think it is necessary: ​​

I am trying to create a complex number header which I can do to make complex mathematics I can include in the project. I know about the library but it is, IMHO, ugly and if the time of coding is used extensively, even then I am trying to coding to improve my coding skills. My goal is to type cmplx num1 = 3 + 4i; Where '3' and '4' are arbitrarily and 'I' is a mark similar to the decimal mark that tells '4' to be imaginary.

I would like to create a new unary mark defined as a member of a created datatype Specifies a constant number in the code.

You can use which were introduced in C ++ 11. For example, in Ming, you have a class type type and you want to use the num_y syntax, where num is a < code> NumericType , you can:

  type operator "" _ (numeric type I) {return type (i); }   



Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -