Chris Ashley
Need a little help here guys. Tried to compile it and it said 'b' does not have type.
Danny
okay
Jasim
https://helperscript.com/udemy-paid-courses-video-free-to-download/
Chris Ashley
Anonymous
noop
Anyone? Please?
auto is part of C++ since standard C++11, so you should compile it with specifying the standard
Anonymous
ohh idk then
Chris Ashley
Anonymous
#include <stdio.h>
int rec(int);
int main() {
printf("%d",rec(5));
return 0;
}
int rec(int n)
{
if(n<=1)
return 20;
return rec(n-1);
}
Anonymous
Anyone explain this
Mukkeen
Hello everyone
I've searched Google but still don't understand the answer been gathered.
How can i get my ip and network name through C?
Can anyone make it more comprehensive for me
Anonymous
Anonymous
Watch my graphics design in c language
Anonymous
Anonymous
Anonymous
Thank you
Anonymous
Already done 😄
Sadashiva
Agree
Anonymous
Anonymous
klimi
undefined reference and other stuff
Anonymous
Answer is 41 but i want explanation
Asdew
noop
Answer is 41 but i want explanation
The first line creates a memory block of int and gives its address to p, so the value of p is the address of that int block. Assume that the value of p is something like this: 0x718155, which is an address.
Second line, says that the value of that int block is 42. So, if someone goes to the address of 0x718155 and checks the value inside, it is 42.
Third line creates another int-pointer (v) or address. v has the same value as p. Now both p and v have the value of 0x718155.
Line fourth says that: go to the address of 0x718155, change its value to 41.
Anonymous
Why code blocks need std:: for running any c++ program and how to solve it
noop
klimi
Anonymous
Cout<<"\n hello world:"; doesn't run
But
Std::cout<<"\n hello world:"; runs
Why???
klimi
Anonymous
klimi
but in the other hand library <iostream> # input and output
namespace there are functions to manage streams
Anonymous
Anyone here please give me a road map to become a successful software developer
klimi
_ghost
Yash Ajitsaria
How to write a c program to reverse a 5 digit number
Yash Ajitsaria
Can you explain more . Please
Yash Ajitsaria
How to put the number in correct place
Yash Ajitsaria
I'm new in C programming..
klimi
eg if you want to reverse number 15
you take the 5
and place it into new number
then you take 1
and put it after 5
so you have 51, congratulation
Yash Ajitsaria
Thanks
klimi
Yash Ajitsaria
Yep
Over-engineering
Can some explain me this code?
if (s1.find(s2) != std::string::npos) {
std::cout << "found!" << '\n';
}
What does npos mean?
klimi
Over-engineering
Mar!o
http://www.cplusplus.com/reference/string/string/npos/
Mar!o
I think it has some good stuff
Mar!o
At least it's enough to lookup a function or class
Mar!o
Yeah cppreference is better of course
Ronak 🇮🇳
class Std_interface {
public:
virtual void start() = 0;
virtual void suspend() = 0;
virtual void resume() = 0;
virtual void quit() = 0;
virtual void full_size() = 0;
virtual void small() = 0;
virtual ~Std_interface() {}
};
class Text : public Std_interface {
vector<int> s;
public:
void start();
void suspend();
// ...
virtual void print();
};
void (Std_interface::* pmi)() = &Text::print;
void (Text::*pmt)() = &Std_interface::start;
Ronak 🇮🇳
Ronak 🇮🇳
?
Ronak 🇮🇳
ahan,
the rule that says we can assign a pointer to a
derived class to a pointer to its base class
Ronak 🇮🇳
void (Std_interface::* pmi)() = &Text::print;
its wrong why?
Ronak 🇮🇳
okay.
Serenity
Hey guys
klimi
Serenity
Can somebody help me ?
I_Interface
Serenity
I am trying to write a function that gets a string of numbers and stores them in a 2D matrix.
Anonymous
thanks
Serenity
But when I call the function twice the values glitch into the second matrix with no special reason.
Serenity
The calls are distinct so how does it make sense ?
Serenity
It would be easier to explain with an example.
Serenity
void read_mat(int mat[][SIZE])
{
int i, j = 0;
char x;
int flag = 0;
for (i = 0; i < SIZE; i++)
{
for (j = 0; j < SIZE; j++)
{
x = getchar();
if (x == '0')
mat[i][j] = 0;
else if ((x == '\n') && (i < 5) && (j < 5))
{
flag = 1;
break;
}
else
mat[i][j] = 1;
}
if (flag == 1);
break;
}
Serenity
I think it's related to the functionality of getchar()
Anonymous
so i read about abstract class. i was still thinking that Bulk_quote and Limited_bulk_quote would still need to look at the price (double) member (protected) of Quote and so I have to still look up the inheritance hierarchy, but then i found out that I can be explicit about the member in T using using
Serenity
Do you want me to show you the instructions so that you can understand what the code is about ?
Serenity
I pass in 2 different matrices
Serenity
the general idea of the task is to get two matrices from the user and apply some kind of matrix multiplication
Serenity
My issue is about getting them properly from the user
Serenity
The matrices have constant rows and columns (square matrices 5X5)
Anonymous
Anonymous
yes. but the price member (double, not function) of Quote will still be needed in Bulk and Limited for calculations