Abhishek
Has anyone worked with Assimp?
I've downloaded the library source
Should I be using that entire thing or just the code folder?
I am trying to use it with add_subdirectory() in CMake in my project
I am using MinGW to compile
I am using C++ 17
Aura
/warns
Jitendra
/warns
Yasas
/warns
Yasas
/note
Yasas
/get
Yasas
/get notes
Yasas
/get cpp-vscode
Ekal
hello
Ekal
ive got a question
Ekal
im on a mini project
Ekal
it is said to make a program
Ekal
Example project:
The mini project can calculate:
1. Area of square
2. Area of triangle
3. Volume of cone
4. Average of 5 numbers
5. Body Mass Index (BMI)
Ekal
my question is how to merge or combine two calculation??
Ekal
thankyou i will try that
Aditi s
/warns
Official hooligan of Pius XII
I have some weird problem
I declare CLEAR this way
#ifdef _WIN32
const char CLEAR[3] = {'c', 'l', 's'};
#else
const char CLEAR[5] = {'c', 'l', 'e', 'a', 'r'};
#endif
but when i pass it to a function doing system(CLEAR) it is interpreted as "clsE0'a" on windows (on linux "clear" works) can anyone point me what might be the case?
Pavel
Anonymous
what the difference between gcc and g++
Pavel
Anonymous
Official hooligan of Pius XII
Official hooligan of Pius XII
tho on linux it was working all the time, are unixlike os-es more smart when it comes to c-strings?
Official hooligan of Pius XII
𝙰𝚖𝚖𝚊𝚛
Hello everyone
Is there a "type casting" for functions in C++ ?
I mean if i have an "int function(int , char )" and in a special case i want to make this function return string, can i make that?
Or is there another way to do this?
Sorry for my long message but this group helps me a lot
Pavel
Official hooligan of Pius XII
ninja
/warns
Official hooligan of Pius XII
well, you can also always return a string and then use stoi() if possible, if you want it to be really straightforward, like that
string test()
{return "1";}
int main()
{int test1 = stoi(test());}
𝙰𝚖𝚖𝚊𝚛
𝚒𝚗𝚝 𝙾𝚙(𝚒𝚗𝚝 &𝚡, 𝚌𝚑𝚊𝚛 𝚘){
𝚒𝚗𝚝 𝚡2;
𝚌𝚒𝚗 » 𝚡2;
𝚜𝚠𝚒𝚝𝚌𝚑(𝚘)
𝚌𝚊𝚜𝚎 ' - ':
𝚡 = 𝚡 - 𝚡2;
𝚛𝚎𝚝𝚞𝚛𝚗 𝚡;
𝚌𝚊𝚜𝚎 '/':
𝚡 = 𝚡 / 𝚡2;
𝚛𝚎𝚝𝚞𝚛𝚗 𝚡;
}
𝚒𝚗𝚝 𝚖𝚊𝚒𝚗 () {
𝚌𝚒𝚗 » 𝚡 » 𝚘;
𝚌𝚘𝚞𝚝 « 𝙾𝚙(𝚡,𝚘);
𝚛𝚎𝚝𝚞𝚛𝚗 0;
}
I want to cout a message if x2=0, but also 1 - 1 could be zero too
@skelly37
@gameraccoon
artemetra 🇺🇦
Official hooligan of Pius XII
Official hooligan of Pius XII
im a bit sleepy and on phone so its rather pseudocode but i bet you understand the idea
𝙰𝚖𝚖𝚊𝚛
Official hooligan of Pius XII
Official hooligan of Pius XII
stoi() literally converts string to integer
Pavel
𝙰𝚖𝚖𝚊𝚛
@skelly37
@gameraccoon
I will think about it and give it a try... Thanks a lot for help
$lick $loth
Podrían ayudarme?
Rberto
$lick $loth
Can someone help me with ac programming test?
Jostick
Hi, some one can help me, I want to learn c++ but I dont know the steps to follow to be a profesional, beacuse i would like to contribute to linux or other programs written in c++
class Person(Skills): name = str("Ankush Bhagat")
How I do that :
If (os == Android)
{
.....
}
In C language !
Official hooligan of Pius XII
Official hooligan of Pius XII
you can also use #else in here
Official hooligan of Pius XII
Here are another cases. Compiler macros are very useful sometimes
https://iq.opengenus.org/detect-operating-system-in-c/
class Person(Skills): name = str("Ankush Bhagat")
class Person(Skills): name = str("Ankush Bhagat")
Brother can you help me how did I print ASCII art or ANSI art with printf or puts in C 🔥
class Person(Skills): name = str("Ankush Bhagat")
I searched over internet but I didn't find any solution !
class Person(Skills): name = str("Ankush Bhagat")
class Person(Skills): name = str("Ankush Bhagat")
Like this
╲ ▁▂▂▂▁ ╱
▄███████▄
▄██ ███ ██▄
▄███████████▄
▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
█████████████
███████████
██ ██
██ ██
Official hooligan of Pius XII
shit, i'm still sleeping lmao sorry
so i don't know the anwser, i mostly use c++ and don't know much about printf
Rberto
no, only english, that's a rule...
olli
Like this
╲ ▁▂▂▂▁ ╱
▄███████▄
▄██ ███ ██▄
▄███████████▄
▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
██ █████████████ ██
█████████████
███████████
██ ██
██ ██
e.g.
#include <stdio.h>
int main() {
const char * Art[] = {
" ╲ ▁▂▂▂▁ ╱",
" ▄███████▄",
" ▄██ ███ ██▄",
" ▄███████████▄",
" ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄",
" ██ █████████████ ██",
" ██ █████████████ ██",
" ██ █████████████ ██",
" ██ █████████████ ██",
" █████████████",
" ███████████",
" ██ ██",
" ██ ██"
};
for (int i = 0; i < sizeof(Art) / sizeof(Art[0]); ++i) {
puts(Art[i]);
}
}
https://godbolt.org/z/b9echKhxK
class Person(Skills): name = str("Ankush Bhagat")
e.g.
#include <stdio.h>
int main() {
const char * Art[] = {
" ╲ ▁▂▂▂▁ ╱",
" ▄███████▄",
" ▄██ ███ ██▄",
" ▄███████████▄",
" ▄█ ▄▄▄▄▄▄▄▄▄▄▄▄▄ █▄",
" ██ █████████████ ██",
" ██ █████████████ ██",
" ██ █████████████ ██",
" ██ █████████████ ██",
" █████████████",
" ███████████",
" ██ ██",
" ██ ██"
};
for (int i = 0; i < sizeof(Art) / sizeof(Art[0]); ++i) {
puts(Art[i]);
}
}
https://godbolt.org/z/b9echKhxK
Oooh that's working superb bro🙃🙃🥰🥰. ~ Thanks
class Person(Skills): name = str("Ankush Bhagat")
#include <stdlib.h>
int main() {
int system(const char *command);
system("var=$OSTYPE");
system("printf $var");
return 0;
}
class Person(Skills): name = str("Ankush Bhagat")
Why $var is not printing ???
class Person(Skills): name = str("Ankush Bhagat")
Guys help me
Ammar
class Person(Skills): name = str("Ankush Bhagat")
Give me a example of
Jostick
So do you recommend learn c firts AND c++ after?
Anonymous
Jostick
Oh ok
Jostick
Thank you
Manav
//Input format 23,34,5423,12
/*Output format:
23
34
5423
12
*/
#include <iostream>
using namespace std;
int main() {
string str;
cout << "Enter a string" << endl;
cin >> str;
char dstr[20][20];
int k = 0, i = 0, j = 0;
while (str[k] != '\0'){
if (str[j] == ',') {
i++;
} else {
dstr[i][j] = str[k];
j++;
}
k++;
}
for(int l=0 ; l<i ; l++)
{
for(int m=0 ; m<j ; m++){
cout<<dstr[i][j];}
cout<<endl;
}
return 0;
}
Manav
RC
Hey, anyone use Clion? I wrongly made it to zen mode but I wanna change it to be like past, can u help?
@
I do
RC
How should I Change it?
I'll be grateful if you can help
@
When you scroll around the upper edge of the screen does the menu pops?
@
Then press on "view">appearance>exit zen mode
RC