Anonymous
Hlo guyz! Actually, i'm the beginner for c++, so i wanna ask that what type of math is required for c++.
Prometheus
Andre
And Calculus has its uses in programming, but they aren't that many, relatively speaking. You'd be better off learning the basics of formal logic, combinatorics, and maybe a bit of statistics.
pavel
tasya
3.For each of the following, write a program that performs the indicated task.
a)Declare the variable fptr to be a pointer to an object of type float.
b)Declare the floating point variables num1 and num2.
c)Assign 100.20 to num1 as initial value.
d)Assign the address of variable num1 to pointer variable fptr.
e)Print the value of object pointed to by fptr.
f)Assign the value of the object pointed to by fptr to variable num2.
g)Print the value of num2.
h)Print the address of num1.
i)Print the address stored in fptr.
tasya
anyone know how to solve this?
0xJosh
Has anyone read this book
"Programming: Principles and Practice Using C++"?
Did you find the exercises difficult?
klimi
tasya
#include <iostream> using namespace std;
int main()
{
float *fptr;
float num1, num2;
num1 = 100.20;
fptr = &num1;
cout << "*fptr=" << *fptr << endl;
num2 = *fptr;
cout << "num2=" << num2 << endl;
cout << "&num1=" << &num1 << endl;
cout << "fptr=" << fptr << endl;
return 0;
}
\Device\NUL
Hussein
\Device\NUL
YUSUF
Anonymous
How to count interest rate ?
а
Anonymous
Abhimanyu72
const char *Jan1[][3] = {{"11","22","44"},{"55","77","88"},{"15","17","18"},{"16","17","18"}}; //4
const char *Feb1[][3] = {{"aa","bb","cc"},{"ee","ff","gg"},{"jj","kk","ll"},{"nn","oo","pp"},{"rr","ss","tt"}}; //5
const char *March1[][3] = {{"ww","xx","yy"}}; //1
//
const char **ptx[3][4]= {*Jan1,*Feb1,*March1};
How to count internal child arrays of parent array with ptx ?
Sir
Hello everyone! How to create venv for c++ in VS Code?
MRT
0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Has a smaller equivalent in binary?
Poker
Sir
Abdul Mobin
typedef struct {
char name[50];
char matrixno[50];
float score[50];
}student;
student std[100];
int main ()
{
int k;
int n=1;
for (k=1 ; k<=n ; k++){
printf("Name: ");
scanf("%s",&std[k].name);
printf("Matrixno: ");
scanf("%s",&std[k].matrixno);
printf("Score: ");
scanf("%f",&std[k].score);
}
printf("\n\n\n");
for (k=1 ; k<=n; k++){
printf("Name: %s\n",std[k].name);
printf("Matrixno: %s\n",std[k].matrixno);
printf("Score: %f\n",std[k].score);
printf("\n\n");
}}
Abdul Mobin
result of score is zero or adress num
Abdul Mobin
how i can solve this???
Anonymous
https://code.dcoder.tech/files/code/62afe89218354705416d8c2a/array-of-object
Anonymous
thanks for accepting me
\Device\NUL
Anonymous
Can we use c++ for developing Web or apps better?
Moouuaaddhh
Anonymous
Hi!
Please tell me how to fix "undefined reference to sqrt" in VS Code on Linux. I'm new to C / C++.
Moouuaaddhh
Hussein
Hussein
VScode sometimes give false alarms
Anonymous
include math.h
I did. It doesn't work. I searched Google for it and I didn't like those solutions.
Moouuaaddhh
#include "math.h"
Moouuaaddhh
how are compiling? use -lm flag
Anonymous
I'm using Ctrl + F5 for VS Code and F9 for Code Blocks.
Moouuaaddhh
Anonymous
Thank you. It's strange that the error is in two IDEs.
Moouuaaddhh
send the code
Moouuaaddhh
MRT
Anonymous
send the code
OK, I need to learn services for sending a code.
MRT
Moouuaaddhh
Moouuaaddhh
MRT
Moouuaaddhh
so it is in a register? or you read it from memory?
Anonymous
just copy and paste
I can't. I don't use Telegram on a laptop.
https://pastebin.com/PfDZ0eJk
Anonymous
Moouuaaddhh
Moouuaaddhh
Moouuaaddhh
just use IDE on large project or to debug at memory level or something
Moouuaaddhh
to do simple projects is faster to code on sublimetext and compile with g++ directly
Moouuaaddhh
Hussein
also it doesn’t use weird shortcuts for crtl+x to cut, crtl+v to paste crtl+c to copy crtl-q to quit the program
with built-in terminal
and you can use multiple tabs in addition many themes that is has by default
also really useful when editing large files that crash VScode
pavel
pavel
I prefer visual studio. Much more comfortable
Anonymous
That's funny but it doesn't work in Windows. So I need learn gcc.
Hussein
Anonymous
aren’t using linux?
I working in Linux, but I tried to program in Windows. I thought this is more suitable for Microsoft products.
pavel