Harsh
WAP - How to do pointers declarations in c++
Suka
WAP - How to do pointers declarations in c++
type *var_name int *p_int; std::vector<char> *p_v_char;
Rose
Another one bites the dust...! Banned Hua Guliang. Reason: spambot
Khuxie
Does anyone have important questions c++
klimi
Does anyone have important questions c++
Yes. Someone have questions about c++
exo
Does anyone have important questions c++
Do we have to ask you important questions?
Khuxie
My final paper is so i important notes the final exam
exo
?
zarif
2662
Never Spam Bot
Angela Wells sent multiple messages that looks like a spam. To stop the bot from deleting your messages, write something non-suspicious. Or find out why here. Spam deleted in this group: 2666
Malikzada Ahsan
Write a program to take input from user in Fahrenheit and convert it in Celsius and print it. Celsius=(F-32)*5/9
Malikzada Ahsan
Anyone can help me
Knight-Endall
Write a program to take input from user in Fahrenheit and convert it in Celsius and print it. Celsius=(F-32)*5/9
This is the second program taught in The C Programming Language!! Just started the book
Chat Boss
Write a program to take input from user in Fahrenheit and convert it in Celsius and print it. Celsius=(F-32)*5/9
Knight-Endall sent a code, it has been re-uploaded as a quote #include <stdio.h> /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300 */ int main() { int fahr, celsius; int lower, upper, step; lower = 0; /* lower limit of temperature scale */ upper = 300; /* upper limit */ step = 20; /* step size */ fahr = lower; while (fahr <= upper) { celsius = 5 * (fahr-32) / 9; printf("%d\t%d\n", fahr, celsius); fahr = fahr + step; } }
𝐍𝐚𝐛𝐢𝐥 𝐓𝐚𝐡𝐚 𝐀𝐛𝐚𝐬
How can I define a const variable in a class For example: pi = 3.14 , how can I define it?
consteval
How can I define a const variable in a class For example: pi = 3.14 , how can I define it?
https://www.learncpp.com/cpp-tutorial/static-member-variables/
Abbasi
https://www.learncpp.com/cpp-tutorial/static-member-variables/
The question was not having a static object there. Was it?
consteval
The question was not having a static object there. Was it?
well there isn't much use in having a non-static constant member variable
Yasir
Anyone is here who help me for our project to make game through loops and nested loops in c++ programming
Rose
Anyone is here who help me for our project to make game through loops and nested loops in c++ programming
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Never Spam Bot
Hide IP - Aim Victim - Crack Encrypt - ☠️ Kill Firewall sent multiple messages that looks like a spam. To stop the bot from deleting your messages, write something non-suspicious. Or find out why here. Spam deleted in this group: 2682
AmR
I need help in cmake and I try to ask in every channel but No one help. I use boost from git, And I use it in cmake with FetchContent_Declare. But it's not in include dir's and is empty, How I can fix that ? or how I can make CMake install it ?
AmR
I don't know it, And I don't like it.
AmR
👌
How I can setup it and install boost ?
Suka
How I can setup it and install boost ?
sudo pacman -S boost-libs or vcpkg install boost or if using xmake xrepo install boost
AmR
I use windows now
Suka
I use windows now
vcpkg work on windows and linux
ShreeJiiii ♡
Need help in setting up ...c and c++ in vs code along with python
Sajid
Hi, friends
Aaryan
(i < 95) ?(do something) :(do something); i = (i < 95) ?(do something) :(do something); why do both of these codes run the same way? i mean whats the difference... lets say i have to use the value of i while doing that 'do something'...so i don't want its value to be changed..but in the second part it looks as if i am assigning a value of 0 or 1 to i based on the condition (i<95)
Pavel
The assignment to i happens after the evaluation, so doing it doesn't affect the results of the evaluation
Pavel
okay, so i is assigned after either ? or : branch is executed?
Yes, everything on the right side of the = should be executed before the result can be assigned (to i in this case). You can check the order here https://en.cppreference.com/w/cpp/language/operator_precedence (I guess it is worth noting that the list explains the order of evaluation of operators, but not operands of those operators, more about the later here: https://en.cppreference.com/w/cpp/language/eval_order)
Abbasi
The value of i will depend on which branch executed: the "?" or the ":"
It depends on the result of the condition. If it's true the first value will be assigned to i, the second value otherwise.
Harsh
WAP of use of cprintf(); in string. In c language
Suka
WAP of use of cprintf(); in string. In c language
wap? Wireless Application Protocol (WAP) is an obsolete technical standard for accessing information over a mobile cellular network. Introduced in 1999.
Harsh
What is cprintf( ); In c language
harmony5 🇺🇳 ⌤
Rose
Reported Damo [831217613] to admins.​​​​​​​​​​
Amit
cprintf is a non-standard C function that writes formatted output directly to the console. It is similar to printf, but it is specifically designed for console output.
Amit
I think you need to add conio.h which is obsolete
Amit
printf is the alternative
Mk
Hi guys anyone has experience in testing embedded systems using vectors?
Rose
Hi guys anyone has experience in testing embedded systems using vectors?
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Mk
Hi guys any experience in testing vector cast
Suka
Hi guys any experience in testing vector cast
vector as in std::vector? if yes then i believe you cant cast to it you need to construct it. but share what you want to cast to vector?
Money
#include <iostream> #include <conio.h> #include <math.h> #include <iomanip> using namespace std;   const float PI=3.14159265358979323 const float n=0.2032; float area(float dia) { return PI*dia*dia/4; } Int main() {             float pipel[2][4],piped[2][4],pipeqass[2][4],vel[2][4],hf[2][4],hfbyq[2] [4] ,delq[2][4],delq1,d elq2,qdash[2][4],sighf[2]={0,0},sighfbyq[2]={0,0};             int common[2][4];             float qpn,dp4,cpn;             for(int i=0;i<10;++i)             {                         cout<<"\nENTER THE VALUES OF PIPE IN LOOP"<<i+1;                          for(int j=0;j<10;++j)                          {                                      cout<<"\nPIPE NO"<<j+1;                                      cout<<"\nPIPE LENGTH(in m):";                                      cin>>pipel[i][j];                                      cout<<"\nPIPE DIAMETER(in mm):";                                      cin>>piped[i][j];                                      cout<<"\nIS IT A COMMON PIPE?(1-YES,0-NO)";                                      cin>>common[i][j];                                      cout<<"\nFIRST ASSUMED VALUE OF Q(in m^3/min)";                                      cin>>pipeqass[i][j];                          vel[i][j]=(pipeqass[i][j]/60)/area(piped[i][j]/1000);                          qpn=pow(pipeqass[i][j]/60,n);                                      if(pipeqass[i][j]>=0)                                      {                                      dp4=pow(piped[i][j]/1000,4.87);                                                  cpn=pow(100,n);                                      hf[i][j]=10.622*(pipel[i][j])*(qpn)/(cpn*dp4);                                      hfbyq[i][j]=hf[i][j]/pipeqass[i][j];                                                  if(i==0)                                                  {                                                              sighf[0]+=hf[i][j];                                                      sighfbyq[0]+=hfbyq[i][j];                                                  }                                                  if(i==1)                                                  {                                                              sighf[1]+=hf[i][j];                                                      sighfbyq[1]+=hfbyq[i][j];                                                  }                                      }                                      else                                      {                                                  dp4=pow(-piped[i][j]/1000,4.87);                                                  cpn=pow(100,n);                                      hf[i][j]=10.622*(pipel[i][j])*(qpn)/(cpn*dp4);                                      hfbyq[i][j]=hf[i][j]/pipeqass[i][j];                                                  if(i==0)                                                  { sighf[0]+=hf[i][j]; sighfbyq[0]+=hfbyq[i][j]; } if(i==1) { sighf[1]+=hf[i][j]; sighfbyq[1]+=hfbyq[i][j]; } } } delq1=-sighf[0]/(n*sighfbyq[0]); delq2=-sighf[1]/(n*sighfbyq[1]); } for(int i=0;i<10;++i) { for(int j=0;j<4;++j) { if(i==0) delq[i][j]=delq1; if(i==1)delq[i][j]=delq2; } } for(int i=0;i<10;++i) {for(int j=0;j<4;++j) { if(common[i][j]) { if(i==0) delq[i][j]=delq1-delq2; if(i==1) delq[i][j]=delq2-delq1; } } } for(int i=0;i<10;++i) { for(int j=0;j<4;++j) { qdash[i][j]=pipeqass[i][j]+delq[i][j]; } } cout<<"\n\n\nITERATION 1\n\n"; cout<<"SNO LEN(m) DIA(mm) C ASSQ(m^3/min) ASSQ(m^3/s) VEL(m/s) Hf(m) Hf/Q(m/m^3/min) delq(m^3/min) qdash(m^3/min)"; for(int i=0;i<10;++i) { cout<<"\n"; for(int j=0;j<4;++j) { cout<<i+1<<" "<<pipel[i][j]<<" "<<piped[i][j]<<" "<<100< <" "; std::cout<<std::setprecision(4)<<pipeqass[i][j]<<" "<<pipeqass[i][j]/60<<" "<<vel[i][j]<<" "<<hf[i][j]<<" "<<hfbyq[i][j]<<" "<<delq[i][j ]<<" "<<qdash[i][j]; } } getch();  return 0; }
notes please
Money
c
Simple Sorcerer
#include <iostream> #include <conio.h> #include <math.h> #include <iomanip> using namespace std;   const float PI=3.14159265358979323 const float n=0.2032; float area(float dia) { return PI*dia*dia/4; } Int main() {             float pipel[2][4],piped[2][4],pipeqass[2][4],vel[2][4],hf[2][4],hfbyq[2] [4] ,delq[2][4],delq1,d elq2,qdash[2][4],sighf[2]={0,0},sighfbyq[2]={0,0};             int common[2][4];             float qpn,dp4,cpn;             for(int i=0;i<10;++i)             {                         cout<<"\nENTER THE VALUES OF PIPE IN LOOP"<<i+1;                          for(int j=0;j<10;++j)                          {                                      cout<<"\nPIPE NO"<<j+1;                                      cout<<"\nPIPE LENGTH(in m):";                                      cin>>pipel[i][j];                                      cout<<"\nPIPE DIAMETER(in mm):";                                      cin>>piped[i][j];                                      cout<<"\nIS IT A COMMON PIPE?(1-YES,0-NO)";                                      cin>>common[i][j];                                      cout<<"\nFIRST ASSUMED VALUE OF Q(in m^3/min)";                                      cin>>pipeqass[i][j];                          vel[i][j]=(pipeqass[i][j]/60)/area(piped[i][j]/1000);                          qpn=pow(pipeqass[i][j]/60,n);                                      if(pipeqass[i][j]>=0)                                      {                                      dp4=pow(piped[i][j]/1000,4.87);                                                  cpn=pow(100,n);                                      hf[i][j]=10.622*(pipel[i][j])*(qpn)/(cpn*dp4);                                      hfbyq[i][j]=hf[i][j]/pipeqass[i][j];                                                  if(i==0)                                                  {                                                              sighf[0]+=hf[i][j];                                                      sighfbyq[0]+=hfbyq[i][j];                                                  }                                                  if(i==1)                                                  {                                                              sighf[1]+=hf[i][j];                                                      sighfbyq[1]+=hfbyq[i][j];                                                  }                                      }                                      else                                      {                                                  dp4=pow(-piped[i][j]/1000,4.87);                                                  cpn=pow(100,n);                                      hf[i][j]=10.622*(pipel[i][j])*(qpn)/(cpn*dp4);                                      hfbyq[i][j]=hf[i][j]/pipeqass[i][j];                                                  if(i==0)                                                  { sighf[0]+=hf[i][j]; sighfbyq[0]+=hfbyq[i][j]; } if(i==1) { sighf[1]+=hf[i][j]; sighfbyq[1]+=hfbyq[i][j]; } } } delq1=-sighf[0]/(n*sighfbyq[0]); delq2=-sighf[1]/(n*sighfbyq[1]); } for(int i=0;i<10;++i) { for(int j=0;j<4;++j) { if(i==0) delq[i][j]=delq1; if(i==1)delq[i][j]=delq2; } } for(int i=0;i<10;++i) {for(int j=0;j<4;++j) { if(common[i][j]) { if(i==0) delq[i][j]=delq1-delq2; if(i==1) delq[i][j]=delq2-delq1; } } } for(int i=0;i<10;++i) { for(int j=0;j<4;++j) { qdash[i][j]=pipeqass[i][j]+delq[i][j]; } } cout<<"\n\n\nITERATION 1\n\n"; cout<<"SNO LEN(m) DIA(mm) C ASSQ(m^3/min) ASSQ(m^3/s) VEL(m/s) Hf(m) Hf/Q(m/m^3/min) delq(m^3/min) qdash(m^3/min)"; for(int i=0;i<10;++i) { cout<<"\n"; for(int j=0;j<4;++j) { cout<<i+1<<" "<<pipel[i][j]<<" "<<piped[i][j]<<" "<<100< <" "; std::cout<<std::setprecision(4)<<pipeqass[i][j]<<" "<<pipeqass[i][j]/60<<" "<<vel[i][j]<<" "<<hf[i][j]<<" "<<hfbyq[i][j]<<" "<<delq[i][j ]<<" "<<qdash[i][j]; } } getch();  return 0; }
Use ` ` ` and add language name
ANONYMOUS
How do we swap two numbers
WaQaR
Yes
Rose
Hi guys any experience in testing vector cast
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
harmony5 🇺🇳 ⌤
Use ` ` ` and add language name
You're replying to an almost 3yrs old message
Simple Sorcerer
S.
Can anyone tell me how should I installe c++20 in my laptop and how to configer it with vs code
S.
I can help you
Then please Share the process in short
Mk
Who knows linkedlist debugging
Rose
Who knows linkedlist debugging
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Mk
Hello guys anyone knows Do178b testing
Rose
Hello guys anyone knows Do178b testing
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.