Anonymous
but how will the compiler know which class method I want to define?
Anonymous
ohh I removed RYDot:: in the class
Anonymous
yess this worked uwu
Anonymous
thx
Anonymous
Ok
Osoroshi
How to transform String to Int?
Osoroshi
My number is recorded in String, but I need to use it as int
Osoroshi
I don’t have the Internet, only unlimited for instant messengers, so I can’t use the browser to search for simple solutions 😅😥
Anonymous
yes I just misunderstood but it's resolved now :3
Anonymous
⚛ Hz
Sylvester Lim
Hi , i have a question
void swap(int *,int *);
int main()
{
int num1=2,num2=-3;
swap(&num1,&num2);
return 0;
}
void swap(int *x,int *y)
{
int temp;
temp = *x;
*x = *y;
*y=temp;
}
Does changing value of pointer variable in a function also change the value in main function ( as shown in code above)? I was under the impression that only reference variables can do such a change. Thnak you !
Sylvester Lim
Anonymous
Hi,I am confused about which overloaded function testa() should be called.I dont know why.
#include<iostream>
using namespace std;
int testa(const int* a){
    cout<<*a+1<<endl;
    return 0;
}
int testa(int* a){
    cout<<*a<<endl;
    return 0;
}
int main(){
    int b=45;
    int * const a=&b;
    testa(a);
    return 0;
}
Sylvester Lim
Thadeu
Is there some advantage in pass a function call as argument (1) instead of declare a variable to be used on calling (2)?
Ex 1.
funcA(funcB());
Ex 2.
int arg = funcB();
funcA(arg);
Y'amiGami
i can't really find the error in this code:
https://pastebin.com/GacAM9nQ
what i'm trying to do is: ask data of 2 cars and print it.
Ahmed
Pavel
So is pass by pointer capable of changing the original variable in main function , sir?
kind of yes, but you need to understand what is happening first
you have a value, it is somewhere in the memory, you pass a pointer to that value, so the function now knows where in the memory that value is. and can access it and write to it
in case of passing that value, you just pass the value
in C++ there's also pass-by-reference, which is similar to pass-by-pointer but more implicit, and there's also constness that should be taken into account
0xJosh
Calculate mean and median temperature - Pastebin.com
https://pastebin.com/B9HiNGTm
0xJosh
Guys please help me out on this code.
The compiler tell me
"Error : request for member 'push_back' in 'temps', which is of non-class type 'double'
0xJosh
And
"Error: no matching function for call 'sort(std:: vector<double>&)
0xJosh
🙏 what am I doing wrong
Anonymous
Does anyone knows how to use functions swap in c
0xJosh
Pavel
Pavel
I mean I haven't looked on all the parts of the code, I just say what that exact error about
0xJosh
Rename variables?
Push_back is not a variable tho. It's a function used to push elements into a vector from the back
nipab3br3
Egro
do you guys read any c++ text books? i see a lot of questions here that are explain in text book. like the function "push_back"
Egro
i have a feeling some people learn progamming as they type, not knowing what they are typing
Egro
important to read about the language and how its properties are used and applied, then our self practice what we read
\Device\NUL
Simon
Someone help me to begin learning C++,,
Simon
They are very expensive,kindly can you assist me with a PDF notes for a begginer purposely in C++.
Simon
Someone to help me with various examples of written programs in C ++,eg From Hello World,sum of two numbers,Controls eg if,if else if ,case etc do that I can run them to perfect
0xJosh
0xJosh
Simon
It have no practice exercise which will help me compile then and run in pc
0xJosh
Simon
0xJosh
Do a simple goggle search
Like "examples of written program in c++"
George
George
Guys, I have concerte basics in C language
George
Now looking to start working on C based real application project
George
Any beginner friendly application opensource on github
George
My area of interest is Embedded Programming
Sylvester Lim
Abyss Devolos FT1232 Balance
Vatryek Wing Accel B9492 Attack
if(infile)
{
while(infile>>*(name+i)>>*(id+i)>>*(type+i))
{
i++;
}
Hi, i want to insert cardName, cardID, and cardType into 3 parallel arrays, but since they are all STRING type, with my code above since card name have space between them, it will be inserted to the next parralel array. I have tried with getline but it will then insert the whole line into the array, which defeats the purpose of wanting to put them into parallel arrays. What can i do ? (No vectors pls) just plain simple arrays , any help is appreciated
Anonymous
Anonymous
Sylvester Lim
A
I have a question
A
If i need to store multiple ID for example "A23FF5686", and i want later to store every single one of those id's for later calls
A
How come can i include integer with string in the same id
A
And is it possible to get them all in a single variable
KRYZ
I have a question concerning blockchain programming.
Can blockchain be programmed with C(Low Level Programming Language)?
A
I mean the integer and the string in the id
Osoroshi
Hi. Tell me how best to read data from COM Port and then use it?
0xJosh
0xJosh
0xJosh
KRYZ
0xJosh
OK thanks
You can check out Ripple.
I think they use C
Ибраги́м
https://www.youtube.com/watch?app=desktop&v=ZQFzMfHIxng&feature=youtu.be
pavel