-
Hello I have a question about set and get function in classes, if I have 3 classes have some common data member, can I write one set and get functions in global scope and link it as friend function?
Chat Boss
99 sent a code, it has been re-uploaded as a file
Chat Boss
Hello I have a question about set and get function in classes, if I have 3 classes have some common data member, can I write one set and get functions in global scope and link it as friend function?
Pavel sent a huge message, it has been re-uploaded as a file Using friends doesn't sound as a good idea. But what do you mean by common data member? If you h..
孙笑氕氘
Hello everyone, is there any library that can demangle GCC symbols under windows?
Vipul
Programming in ansi
Vipul
Book download
-
Hi I want to append a text in a file according to the line and letter number given by the user. I open the file in the append mode ,save all the data after the given position (line and letter number),fseek to the given position and then append my text and add the rest of text which was saved in an array by fputc But my text doesn’t go to the right place.any idea what can I do to fix it ?!
(-__-)
#include <iostream> #include "BMI.h" using namespace std; int main() { string name("John Doe"); BMI bmi1(name); name[0] = 'P'; cout << "name from bmi1.getName() is " << bmi1.getName() << endl; cout << name << endl; BMI bmi2(name); cout << "name from bmi2.getName() is " << bmi1.getName() << endl; return 0; }
Strife
How important is it to learn pointers?
Strife
yes
I think it is one of the most difficult parts of cpp
klimi
I think it is one of the most difficult parts of cpp
it's the basics of C and CPP imho
Strife
Oh god😅
klimi
Oh god😅
dw, pointers are quite easy :)
Strife
dw, pointers are quite easy :)
thank you. I have a long way to learn this language
-
How important is it to learn pointers?
pointers are one of the most important parts actually.
Wolf
Job searching is available here?
klimi
Job searching is available here?
6. Advertisements of any kind are forbidden. Job postings will not be allowed either.
Soheil
Hey guys, does anybody know physics engine here?
Soheil
yes
Can I DM you from private?
Soheil
I have no experience in PE and I would like to work with somebody, what do you advise?
neon 🇮🇳
Hi all
neon 🇮🇳
I am learning C++ plus ASM
Suraj
Hi guys
Suraj
What is lexical value in arrow function
neon 🇮🇳
Dm
I am learning C++ plus ASM
keep us up to date 🙂
neon 🇮🇳
Anonymous
no
😂😂 @K11M1
Anonymous
Hello everyone, is there any library that can demangle GCC symbols under windows?
Try CBMC on Google is model checking for symbolic execution in C
klimi
we don't have c# chat
klimi
have you read the rules by any chance?
lumen
https://t.me/programminginc/453966 there
Chat Boss
hafiz shafi sent a huge message, it has been re-uploaded as a file Is derive of derive class actually can override protected virtual function of base class? Examp..
Beast
Hi
Anonymous
Guys how to use std::generate? I have some range and what to initialize it with default value through it like Type{}
Anonymous
How important is it to learn pointers?
In C a lot. In C++, you can get by by learning to use smart pointers without having to worry about much of the complications about memory freeing and so on. But eventually when you advance into writing allocators and stuff, knowing about raw pointers does help a lot.
Strife
In C a lot. In C++, you can get by by learning to use smart pointers without having to worry about much of the complications about memory freeing and so on. But eventually when you advance into writing allocators and stuff, knowing about raw pointers does help a lot.
thanks a lot. Honestly, everything is possible to learn and the fact that I say it is hard is related to the amount of time I spend to learn cpp. But even though I read in the news or articles, I still do not understand the definition of pointers in the common sense. Because usually many people express things complicatedly
Strife
Actually, I have no idea why pointers should be used
Anonymous
std::generate(rng.begin(), rng.end(), [&](){return Type{};});
Compiler gives error that lambda can't be without arguments
Anonymous
I want some one to run my code in its Computer and send screen for output
Anonymous
why?
I am NOT have Computer now
klimi
I am NOT have Computer now
uhm... and you need output what for then?
Anonymous
Compiler gives error that lambda can't be without arguments
Ufff...just add an empty set of parentheses after the capture....I have updated the code...
Anonymous
I want compiler online to run code with spaces Window and opengl
klimi
I am NOT have Computer now
so why don't you just run it when you get to your computer?
Anonymous
so why don't you just run it when you get to your computer?
Its homework and my Computer in other city FROM me
neon 🇮🇳
Its homework and my Computer in other city FROM me
You can use your smart phone and install online compiler or can use online compiler to compile your code.
Anonymous
And?
The same error
Anonymous
The same error
Must be something wrong with your code then. Unless you show your code, we can't help you. This works fine for me. #include <algorithm> #include <vector> #include <iostream> int main(){ std::vector<double> v(5); std::generate(v.begin(), v.end(), [&](){return 1.0;}); std::cout << v[2] <<std::endl; }
Chat Boss
Jillur Rahman Riyad sent a code, it has been re-uploaded as a file
Mahmudul
I'm new in C++ programming can anyone help me how to get started
Mahmudul
I would be very grateful if someone helps me out
klimi
the pinned message
Anonymous
^^^ The channel above has links to video resources and recommended books. If you had read the rules, you wouldn't be asking this question.
Chat Boss
:) sent a code, it has been re-uploaded as a file
Anonymous
Hi
Anonymous
Please can someone help explain for loops in C I don’t get it well 🙏🙏
M O H I T
Please can someone help explain for loops in C I don’t get it well 🙏🙏
Loops are used to repeat a block of code number of times until it meets the required condition Consider gfg and do some basic codes on all three loops For loop While loop and Do while
Eric Czeladka 🇫🇷
Hi everybody. Below... Is a small code. I d like to extract 2 numbers in a string but just the 2 first. And also while input is incorrect I ask again and again for input and i want to count the numbers in the string... If more than 2. This line c = sscanf(saisie,"%d %d",&a,&b); Doesn't seems to do the job. Any idea ? Tks int main() { int a,b,c ; char saisie[255]; do { printf("pls input a string with 2 numbers\n"); gets(saisie); c = sscanf(saisie,"%d %d",&a,&b); printf("c = %d\n", c); } while (c!=2); printf("you have input%d in first and %d in second\n",a,b); }
Anonymous
Why are you do that, if you want to delete prevent first , now when he will be online it's not possible to him to see my suggestion
Anonymous
@K11M1 do you agree with something that happened?
klimi
@K11M1 do you agree with something that happened?
what's the "something"?