Anonymous
👍
Anonymous
Just help me with the flow chart
Astral
Hello , Would Anyone Here tell me What is the main Purpose of int main()? Why using int before main()?
Anonymous
good morning All
aj
For c++ code? Or c code
I met it in a c++ code so am not sure if it is for general c code
Astral
We use it so as we may have an interger based output for c++ code
Ok i understand but even using this function we also use charater dataype to print a character and strings ??? So why we dont declare a char main()?
aj
Hope other programmers will give an additional opinion
Carmine
Hope other programmers will give an additional opinion
The return value of the main just tells the OS the status of the process: - 0, everything ok - other values, there was an error It’s not an opinion...
Vitaliy ◀️TriΔng3l▶️
Mostly used in shell scripts where entire programs are used pretty much like functions
Anonymous
Hey guys! How do i write a c++ program that output the sum of 2 numbers which is equal to the number i input? The sum cannot have 3 in it🤔 But the input can
Sanjay Tharagesh
I guess so.
Zaniolo
Inheritance
Anonymous
Yes!
Anonymous
Input: 1234 output: 1224 10
Anonymous
Input: 3345 output: 2245 1100
Anonymous
🙂
Anonymous
The input
Anonymous
Then it should output 2 numbers
Anonymous
The sum should be equal to the output
Anonymous
Input*
🐰🐾 سمیه
https://codepen.io/ebrahimi36655/pen/zXBmrx
Zaniolo
?
Anonymous
Thanks
🐰🐾 سمیه
https://codepen.io/ebrahimi36655/pen/zXBmrx
hi. this is the link of the program. I modified it and added a function for modulus operator, but got an error for that. could you please determine what's wrong with it?
Anonymous
Two pair of inta
Anonymous
Ints
🐰🐾 سمیه
function fmod() is at this part
Elnee
Hi all! I created one class and derived it from two. Now I can't create an instance of that class because it's abstaract. How can I use methods from two classes in one class?
MᏫᎻᎯᎷᎷᎬᎠ
Hi all! I created one class and derived it from two. Now I can't create an instance of that class because it's abstaract. How can I use methods from two classes in one class?
i didn't understand your question But maybe you'll get something from this example: class A { public: void test(){} }; class B { public: void test(){} }; class C : public A, public B { }; void foo() { C c; c.A::test(); //calling test A c.B::test ();//calling test B }
MᏫᎻᎯᎷᎷᎬᎠ
🐰🐾 سمیه
Could you please take a look at that?
MᏫᎻᎯᎷᎷᎬᎠ
🐰🐾 سمیه
https://codepen.io/ebrahimi36655/pen/zXBmrx
🐰🐾 سمیه
hi. this is the link of the program. I modified it and added a function for modulus operator, but got an error for that. could you please determine what's wrong with it?
🐰🐾 سمیه
function fmod() is at this part
MᏫᎻᎯᎷᎷᎬᎠ
There are a lot examples above
MᏫᎻᎯᎷᎷᎬᎠ
Here it is
Sorry I got -what I call- Cphobia Which means I hate to look at C codes So I can't help you a lot
MᏫᎻᎯᎷᎷᎬᎠ
Why you have Cphobia?
C has a real bad code base
MᏫᎻᎯᎷᎷᎬᎠ
Soon I start reading a C code my head goes dazing
🐰🐾 سمیه
Which language you like most?
MᏫᎻᎯᎷᎷᎬᎠ
Which language you like most?
C++ I recommend it to you
Parra
C has a real bad code base
how a language like C can have a code base?
🐰🐾 سمیه
But I can't develop Linux kernel by C++. C is needed for that
MᏫᎻᎯᎷᎷᎬᎠ
how a language like C can have a code base?
it's really hard to read a C code unless you have some previos experience and level 100 of patients
MᏫᎻᎯᎷᎷᎬᎠ
Parra
the thing is that nobody is supporting C as a group or company, there isn't real code base or standards like in go
🐰🐾 سمیه
Parra
Hmmm C is a subset of C++ so...
to me they are different languages
MᏫᎻᎯᎷᎷᎬᎠ
It's true, learning C is the most arduous work to do.
C is an easy language C++ is harder but reading C++ code is much easier than C
MᏫᎻᎯᎷᎷᎬᎠ
that's why there's a lot C++ wrappers out there
MᏫᎻᎯᎷᎷᎬᎠ
to me they are different languages
yup cuz C lacks many things that C++ has
Parra
exacly
MᏫᎻᎯᎷᎷᎬᎠ
like templates OOP ....etc
Parra
and the philosophy it's completely different
MᏫᎻᎯᎷᎷᎬᎠ
and the philosophy it's completely different
C really put you on risk(shooting your foot) unless you are 100% focused
Talula
C really put you on risk(shooting your foot) unless you are 100% focused
I have no problem with C, only thing are strings in C are pain.
MᏫᎻᎯᎷᎷᎬᎠ
damn
Parra
I have no problem with C, only thing are strings in C are pain.
but you can have your string "class" too
MᏫᎻᎯᎷᎷᎬᎠ
I'd rather travel a hundred miles
Parra
I have my std in c
Talula
but you can have your string "class" too
String Class? There are no classes in C I think.
MᏫᎻᎯᎷᎷᎬᎠ
Parra
String Class? There are no classes in C I think.
but you can code object oriented c and have pimpl pattern
MᏫᎻᎯᎷᎷᎬᎠ
it's C++
Parra
it's a common pattern in c