Nobody🪲
Any recommendations about problem solving?
Gilded
dont think much on problem solving its just upto few exams and marks for that ur teachers gives practice questions
Anonymous
you have to practice it is important
Gilded
think on projects and own creative coding only
Gilded
other compilers gives output but not xcode
Gilded
Return 0;
2 return 0s?
Anonymous
Gilded
Wat 2?
return 0 already added at end of code
Anonymous
code #include <iostream> using namespace std; class Note { // declare a static data member static int num; public: // create static member function static int func () { cout << " The value of the num is: " << num << endl; return 0; } }; // initialize the static data member using the class name and the scope resolution operator int Note :: num = 15; int main () { // create an object of the class Note Note n; // access static member function using the object n.func(); return 0; }
Gilded
What do u mean
generally only 1 time return in program right
Gilded
we can use return for functions in middle of program also not just at end?
Gilded
🥲
Danya🔥
Do you know what a return is?
Gilded
Do you know what a return is?
just know it will exit and end program
Anonymous
wtf lol
Yea he needs a book
Gilded
Yea he needs a book
not any course?
Danya🔥
not any course?
#cppbookguide
Anonymous
@ProVITian get urself book
Anonymous
@ProVITian get urself book
U won't regret
Anonymous
code #include <iostream> using namespace std; class Note { // declare a static data member static int num; public: // create static member function static void func () { cout << " The value of the num is: " << num << endl; } }; // initialize the static data member using the class name and the scope resolution operator int Note :: num = 15; int main () { // create an object of the class Note Note n; // access static member function using the object n.func(); }
Gilded
No return
at last there is return 0 right
Anonymous
we can use return for functions in middle of program also not just at end?
Return 0 inside main is for processing to indicated that a program went fine but inside a function return is used with non void function and return 0 indicates failure, return 1 indicated success,
Danya🔥
Anonymous
Anonymous
thanks
Read also about exit(), atexit()
Danya🔥
Read also about exit(), atexit()
Why do you suggest to read about OS specific stuff to a newbie that doesn't know what return does?
Danya🔥
What's is not true
There is the direct quote this is not true
Danya🔥
And u need to explain why it's not true
Because it is. There is not much to explain to begin with. it is just a false assumption
Prince Fine
Ik I'm sry about that but just need that one only I tried asking them but everyone send me a useless website stackoverflow ...
Anonymous
exit() can be used in file pointers LoL
Danya🔥
exit() can be used in file pointers LoL
What the actual fuck are you talking about
Ludovic 'Archivist'
Stackoverflow is not useless
Arguable. Stackoverflow is useless beyond main stream questions, don't ask for stuff that is very ABI specific, even when specifying what ABI you are talking about, because people cannot read
Anonymous
Anyone having pdf notes or tutorials c language
Nobody🪲
#include<stdio.h> int main() { double num1,num2; char oper; printf("enter two number yoou want to calculate:"); scanf("%lf %lf",&num1,num2); printf("enter what you want to do(+-*%)"); scanf("%c",&oper); switch(oper){ { case '+': printf("%lf +%lf=%lf\n",num1,num2,num1+num2); break; } { case '%': printf("%lf%%lf=%lf\n",num1,num2,num1%num2); break; } { case '-': printf("%lf -lf=%lf\n",num1,num2,num1-num2); break; } { case '*': printf("%lf %lf=%lf\n",num1,num2,num1*num2); break; } }
Nobody🪲
Trying to build a simple calculaor but its nit running
X
#include<stdio.h> int main() { double num1,num2; char oper; printf("enter two number yoou want to calculate:"); scanf("%lf %lf",&num1,num2); printf("enter what you want to do(+-*%)"); scanf("%c",&oper); switch(oper){ { case '+': printf("%lf +%lf=%lf\n",num1,num2,num1+num2); break; } { case '%': printf("%lf%%lf=%lf\n",num1,num2,num1%num2); break; } { case '-': printf("%lf -lf=%lf\n",num1,num2,num1-num2); break; } { case '*': printf("%lf %lf=%lf\n",num1,num2,num1*num2); break; } }
#include<stdio.h> int main() { double num1,num2; char oper; printf("enter two number yoou want to calculate:"); scanf("%lf %lf",&num1,&num2); printf("enter what you want to do(+-*%)"); scanf("%c",&oper); switch(oper){ { case '+': printf("%lf +%lf=%lf\n",num1,num2,num1+num2); break; } { case '%': printf("%lf%%lf=%lf\n",num1,num2,num1%num2); break; } { case '-': printf("%lf -lf=%lf\n",num1,num2,num1-num2); break; } { case '*': printf("%lf %lf=%lf\n",num1,num2,num1*num2); break; } }
Anonymous
#include <stdio> #include <time.h> //for sleep() function #include <unistd.h> #include <stdlib.h> int main() { int hour, minute, second; hour=minute=second=0; while(1) { //clear output screen system("clear"); //print time in HH : MM : SS format printf("%02d : %02d : %02d ",hour,minute,second); //clear output buffer in gcc fflush(stdout); //increase second second++; //update hour, minute and second if(second==60){ minute+=1; second=0; } if(minute==60){ hour+=1; minute=0; } if(hour==24){ hour=0; minute=0; second=0; } sleep(1); //wait till 1 second } return 0; }
✞✟✞✟✞
Could anyone invite me to any more professional c++ groups without so many people asking to do college assignments for them and more actual language discussing? No offence to anyone
✞✟✞✟✞
what projects have u made till now
Writing C++ and CUDA for work on daily basis
✞✟✞✟✞
More up to discuss architecture and styling questions
Gilded
he want discussion of errors and developments of softwares projects apps like that
paper
More up to discuss architecture and styling questions
Go search on other platforms then , there's no public groups of this kind in telegram
Klaus
Any references for command line argument .. ubuntu
Marcio
The error says exactly what you need to change
Choose an option: 1. Change int by void in static int func() 2. Return an int value in func()
Danya🔥
Could anyone invite me to any more professional c++ groups without so many people asking to do college assignments for them and more actual language discussing? No offence to anyone
@en_it_chats But to be honest, there's not really one. Although there's one Advanced C++/Qt group, but it's Qt..
Pavel
Could anyone invite me to any more professional c++ groups without so many people asking to do college assignments for them and more actual language discussing? No offence to anyone
There were tries to create private "pro" chats but those are mostly dead. There are a couple of Russian public C++ chats that maintain it somehow by moving newbie questions to the newbie chat and keeping the "pro" chat clean, but that requires constant moderation
Anonymous
Hey
Anonymous
Can anyone helps me with one code?
Anonymous
Delete even number from a array c program??
Dima
lol
klimi
Delete even number from a array c program??
afaik there is no standard function to do such thing, you are best off to implement it by yourself
C
Delete even number from a array c program??
Logic is simple, try yourself if you find any difficulty then ask