klimi
You even said how to program it, so I dont... Nvm
Anonymous
Who can send me a pdf
Duncan
😂😂🙌
klimi
Dima
do as you like
Anonymous
Warn?
What😂😂😂
Dima
What😂😂😂
Read the rules
Anonymous
Ok
Emir
can someone help me about algorithm?
I_Interface
can someone help me about algorithm?
U need it, not us. Write it on a list of paper. Step by step. Ask if u will have a problem with code.
Emir
I just wanted to ask should I use while in while?
Anonymous
I just wanted to ask should I use while in while?
it's more convinient to use for loops here, but you can use while ones of course
Anonymous
https://pastebin.com/YztLdcVa
Anonymous
Here is the program
Anonymous
Hi All
Anonymous
Hi All
Hello
Anonymous
Hmm
Anonymous
Can You Suggest me Any others groups like this?
Anonymous
Iam New to Programming
Anonymous
Ask there
Anonymous
#ot
Anonymous
Endianess it's not related to this.
how long have you been a developer
Anonymous
i install new version of gcc on my computer but for some reason when i do gcc -v it say old version , but when i try to reinstall it says it has the latest version already
Javi
That depends on you SO
Anonymous
Humbles-MacBook-Pro:~ humblerise$ brew upgrade gcc Error: gcc 9.2.0_1 already installed Humbles-MacBook-Pro:~ humblerise$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/lto-wrapper Target: x86_64-apple-darwin15.6.0 Configured with: ../gcc-7.1.0/configure --enable-languages=c++,fortran Thread model: posix gcc version 7.1.0 (GCC)
Javi
I'm not very familiar with mac. But google how does it set the path and how does it handle different versions. In linux it uses the alternative links, but I don't know how it works with apple
Javi
The system variable $PATH tells the so where to look for executables when you type a command without the path. When you write, for example, ls, you are actually executing /usr/bin/ls (in linux). This can only happen if the directory /usr/bin is included in the path
Anonymous
so my path is set wrong , or installed the new version in the wrong path?
Javi
It may be that, or you have to reset a link. In linux, when you install two versions of a program (for example gcc), gcc is actually a link to one version, that acts as a default. That way when you type gcc, you are actually executing gcc-v6, and if you want to execute other version, you have to type explicitly gcc-v7
Javi
As I said, this is linux, I don't know in mac
Anonymous
should be similar if not the same , uses same commands
Javi
Maybe
Anonymous
Maybe
i was able to find the path using echo $PATH
Javi
Try "whereis gcc"
Anonymous
Javi
There, check if gcc is a link
Javi
ls -la /usr/bin/gcc
Anonymous
ls -la /usr/bin/gcc
-rwxr-xr-x 1 root wheel 31456 Oct 18 00:34 /usr/bin/gcc
Javi
ls -la /usr/bin/gcc*
Anonymous
ls -la /usr/bin/gcc*
-rwxr-xr-x 1 root wheel 31456 Oct 18 00:34 /usr/bin/gcc
Anonymous
thats what its saying
Anonymous
/usr/bin/gcc and /usr/local/bin/gcc
Anonymous
i see two gcc ,
Francisco
?/
Look for update-alternatives
Francisco
That's the best way to link executables
Javi
It doesn't look like links
Javi
Better check in google how does mac handle with versions
Javi
you can also execute /usr/bin/gcc -v and /usr/local/bin/gcc -v
Javi
To see which versions are they
Ибраги́м
https://www.reddit.com/r/cpp/comments/dn8qrq/unproductive_challenge_longest_variable/?utm_source=share&utm_medium=web2x
Anonymous
why are all the currency have the same output? https://pastebin.com/FPyUdQZe
Talula
why are all the currency have the same output? https://pastebin.com/FPyUdQZe
What in the world is 1 float convert(float fPeso, float fRate) 2 { 3     float USD, Euro, Japan, GBP, CHF; 4     5     USD = fPeso / 51.1811; 6         return USD; 7     Euro = fPeso / 56.9610; 8         return Euro; 9     Japan = fPeso / 0.47181; 10         return Japan; 11     GBP = fPeso / 65.9760; 12         return GBP; 13     CHF = fPeso / 51.7338; 14         return CHF; 15 }
Talula
It will always return USD...
Anonymous
how would I make it return its own currency using one function?
Anonymous
I have separated them into different functions like this and it worked.
Talula
float convert(float fPeso, float fRate) { return fPeso / fRate; }
Anonymous
nice
Anonymous
thanks it finally works
Pavel
Do we have some mechanism to have different class typedefs that are not convertible between each other? E.g. I want to have std::string analogs for ID, path and localizable string. And I want to ensure that I can't pass a path as ID or plain std::string as a localizable string to some function. Also, I want to ensure that they can't be compared via == or !=. E.g. (path == id) should give a compilation error. Also I want to be able to write template specialization for each type (so I can generate path picker field for path in my editor instead of text field) Other than that the classes should act as std::string. Basically I want to achieve something similar with what golang type aliases do. How can I achieve that except for writing my own string from scratch or making a wrapper around std::string and wrap every std::string function in it? I'm using C++17
many
How to implement a tree with different types of nodes and the parent node does not know the types of child nodes when initialized/compile time Eg. template<...> class Node<...>{ T foo; Node<...>* next ... };
Anonymous
template <typename T> using int_map = std::map<int, T>;