+ 19
Which is the diference between std::cout and cout?? C++ have if and else statement where is else if or if else???
12 ответов
+ 10
We use if else like below
if(something)
Do that
else
Do that
And we use else if when there is more criteria for example
If (num==x)
do something
Else if (num>x)
do something
Else //this is if num<x
do something
+ 6
Adela Selimović just one problem with your answer
if and else should be in lowercase
+ 3
{"timestamp":"2019-01-18 18:09:06.41 -0600","bug_type":"211","os_version":"iPhone OS 12.1.2 (16C101)","incident_id":"1167CC4D-7485-4C40-BDF0-E42F10BAB54C"} {"_marker":"","_preferredUserInterfaceLanguage":"en","_userInterfaceLanguage":"en","_userSetRegionFormat":"US","startTimestamp":"2019-01-18T00:11:36Z","version":"1.0"} {"message":{"Accel":2,"Baseband":2,"Bt":2,"Duration":2,"DurationExitFromNoHints":2,"Gps":2,"VehicularDuration":0,"Wifi":2},"name":"VehicularStateDetectionLatencyStats","uuid":"6101aa5f-34b5-456c-b761-e4dea7fcd935"} {"message":{"Accel":1,"Baseband":1,"Bt":1,"Duration":1,"DurationExitFromNoHints":1,"Gps":1,"VehicularDuration":60,"Wifi":1},"name":"VehicularStateDetectionLatencyStats","uuid":"6101aa5f-34b5-456c-b761-e4dea7fcd935"} {"message":{"Accel":1,"Baseband":1,"Bt":1,"Duration":1,"DurationExitFromNoHints":1,"Gps":1,"VehicularDuration":180,"Wifi":1},"name":"VehicularStateDetectionLatencyStats","uuid":"6101aa5f-34b5-456c-b761-e4dea7fcd935"} {"message":{"Accel":1,"Baseband":1,"Bt":1
+ 3
For examle:
Firstly
#include <iostream>
using namespace std;
int main(){
cout<<"Hello world!!!"<<endl;
return 0;
}
Secondly
#include <iostream>
int main(){
std::cout<<"Hello world!!!"<<endl;
return 0;
}
All this codes have the same output.
+ 2
What is this please someone help me
+ 2
std::cout it's the same like cout, but if u'r not set (using namespace std;) , u must write std::cout
+ 1
What about?
0
the diffrence is just you can code easier with (using namespace std;) and you can write your code with out (std::)
0
Hello, can you help me ?
0
Hello
0
std