Prince Of Persia
And please give your variables a good name😅
Prince Of Persia
I was programming like this But trust me You won't understand what you did after 3 weeks😅
𝐄𝐲𝐚𝐝
1. Use formatting tools like clang-format or Resharper C++ or CLion 2. Read Code Complete
Those formatting tools look thicc 🔥 , I'll read about it.
Pati
A flow chart to get the area of a circle Anyone help here
abdullah reveha
how can i get only integers from a file text in c
abdullah reveha
for example: Name: Frank ID Number: 73891 Password: 5624 i want to get ID number and Password
Pati
It's not assignment MTF🥶🥶😤😤
Pati
It's offtop anyway
Reminding myself
Hermann
how copy string in my vector<uint8_t>? vector isnt empty
Anonymous
Anonymous
🏃
Vlad
s/::/::ranges::/
Is this a sarcasm?)
Pavel
Do you know if I can convert a tuple of vectors into a vector of tuples in a variadic template Like here, I can't figure out how should I call std::get to get the correct tuple element https://pastebin.com/xN1c9kND
Pavel
Do you know if I can convert a tuple of vectors into a vector of tuples in a variadic template Like here, I can't figure out how should I call std::get to get the correct tuple element https://pastebin.com/xN1c9kND
Found somewhat working solution here https://stackoverflow.com/questions/26169198/how-to-get-the-index-of-a-type-in-a-variadic-type-pack/26169248#26169248 The final code looks like something like this: https://pastebin.com/4n2vX9cW
Aleksey
Hello, can we realize pattern Visitor on clear C?
Mahdi
/get
.
/get
.
Cool
Earl B
I am trying to produce a program that calculates the probability the user has of getting a dollar and displays it as a percentage. It is functioning correctly, but it is not accounting for the last few digits and just dropping them off. I figured out how to get the correct number to display as an output, but I can't figure out how to take that output and display it as a percentage (by multiplying by 100) #include <stdio.h> int main () { int houses; int housesGivingDollars = 2; printf("Enter how many houses were visited"); scanf("%d", &houses); double totalAfterDivision = (double)housesGivingDollars / (double)houses; printf("%.2f\n", totalAfterDivision); int answer = (totalAfterDivision * 100); printf("There was a %d%% chance that you got a dollar\n", answer); return 0; } Output: 3 is entered for first scanf 0.67 There is a 66% chance you got a dollar. so is there a way to either use that %.2f feature anywhere other than printf, or is there another command that I can store the output from the line "printf("%.2f\n", totalAfterDivision);" to a value? If I use 10 as the inputted number, it is correct at 20%
Aleksey
/get
Ni
second paragraph of description, warning is written in bold
thanks for answering, I'll search for that
Anonymous
/notes
Hanz
#rose_as_my_girlfriend
Hanz
#bro
1 H 3 0 L D G U 4 R D
/ban
Anonymous
/get cbook
রোhन
/warn
রোhन
/notes
রোhन
#awesomeness
রোhन
#india
Anonymous
/get implicit-type-conversion
Anonymous
/get implicit-type-conversions
Pankaj
/notes
Pankaj
Someone explain it
.
/notes
.
/hi
.
:(
⚓Peri⚓
/get cpp-vscode
⚓Peri⚓
#cpp-vscode
ninja
may someone share the installation process of wxwidgets for linux . I am not able to find any good one on google
Earl B
I am trying to produce a program that calculates the probability the user has of getting a dollar and displays it as a percentage. It is functioning correctly, but it is not accounting for the last few digits and just dropping them off. I figured out how to get the correct number to display as an output, but I can't figure out how to take that output and display it as a percentage (by multiplying by 100) #include <stdio.h> int main () { int houses; int housesGivingDollars = 2; printf("Enter how many houses were visited"); scanf("%d", &houses); double totalAfterDivision = (double)housesGivingDollars / (double)houses; printf("%.2f\n", totalAfterDivision); int answer = (totalAfterDivision * 100); printf("There was a %d%% chance that you got a dollar\n", answer); return 0; } Output: 3 is entered for first scanf 0.67 There is a 66% chance you got a dollar. so is there a way to either use that %.2f feature anywhere other than printf, or is there another command that I can store the output from the line "printf("%.2f\n", totalAfterDivision);" to a value? If I use 10 as the inputted number, it is correct at 20%
If anyone is interested in the solution that I figured out, here's what I got. #include <math.h> int main () { int houses; int housesGivingDollars = 2; printf("Enter how many houses were visited"); scanf("%d", &houses); double totalAfterDivision = (double)housesGivingDollars / (double)houses; double answer = (totalAfterDivision * 100); printf("%.f\n", ceil(answer)); return 0; }
ninja
Ubuntu
ninja
20.04
Earl B
Ubuntu
This was right from the website. https://wiki.wxpython.org/InstallingOnUbuntuOrDebian
ninja
i link to work with c++
ninja
python is not good for me!😅
Earl B
That is for c++, but it also installs it for python
Earl B
As per the title. Installing wxWidgets and wxPython On Ubuntu Or Debian
ninja
ok ... thanx
Earl B
Here's another one that seems to give more info. https://www.binarytides.com/install-wxwidgets-ubuntu/ When searching for answers pertaining to Linux, you really need to specify what type your using rather than just Linux
Earl B
Good luck! Linux can be a pain but it's worth it in the long run
Anonymous
Save yourself some time, get windows
ninja
ninja
i use windows only for games
m
Has anyone worked with Juce? What are these errors for? "name followed by '::' must be a class or namespace name"—137 error like this
m
137 syntax error
klimi
That's a really bad screenshot
klimi
Yeah I have seen the bad screenshot in the deleted messages also
klimi
I have no idea why you have sent me it?
klimi
Just send it as a text and not as a screenshot, it will look better and people if they will want to help you can modify it
Anonymous
The number of errors is high
Use a pastebin service.
m
1>------ Build started: Project: NewProject_App, Configuration: Debug x64 ------ 1> include_juce_core.cpp 1>c:\users\mehdi\downloads\juce\modules\juce_core\containers/juce_Variant.cpp(483): error C4579: 'juce::var::Instance::attributesVoid': in-class initialization for type 'const juce::var::VariantType' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported 1>c:\users\mehdi\downloads\juce\modules\juce_core\containers/juce_Variant.cpp(484): error C4579: 'juce::var::Instance::attributesUndefined': in-class initialization for type 'const juce::var::VariantType' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported 1>c:\users\mehdi\downloads\juce\modules\juce_core\containers/juce_Variant.cpp(485): error C4579: 'juce::var::Instance::attributesInt': in-class initialization for type 'const juce::var::VariantType' is not yet implemented; static member will remain uninitialized at runtime but use in constant-expressions is supported 1>c:\users\mehdi\downloads\juce\modules\juce_core\containers/juce_Variant.cpp(486): error C4579: 'juce::var::Instance::attributesInt64': in-class initialization for type 'const juce::var::VariantType' is not yet
:)
Ok
m
Is there a suitable WhatsApp group for C ++?
Diego
You'd know best since it's your code, but, basically I think it says to initialize the member somewhere else
Diego
Rather than in-lining it, try YourStaticMemberType YourClass::YourStaticMember = YourValue
Diego
In the definitions file