Pranjal
yes
Yeah man just figured out, I was using double quotes instead of single In python both meant the same😭
Ziky
char ab = "a"
Haven't you got any warning from compiler?
Pranjal
Haven't you got any warning from compiler?
I didn't understand the error, it said something about assigning constant to variable
Ziky
I didn't understand the error, it said something about assigning constant to variable
yes "str.." returns a pointer to const char and 'A' returns ascii code of that letter which is just plain number
Anonymous
I'll try that We're learning C, writing the simple shell as a way to see how the stuff we've been learning comes together.
In that case, the professor shouldnt expect you to handle EOF for input and stuff. At best you should be able to spawn new processes for commands entered and also handle pipelining of commands. That should be a good enough exercise. I would avoid pipelining as well for beginners because that involves system calls to dup, dup2 et al
Danya🔥
/unban @asdasdadsfav
𝘞𝘦𝘢𝘳𝘪𝘯𝘨𝘔𝘦𝘥𝘢𝘭
hi, I'm having some troubles with meson! I have this: project('tgbot', 'c', version: '0.1.0', default_options: ['warning_level=everything', 'buildtype=release', 'strip=true', 'debug=false', 'optimization=3']) but I don't know why doing file exec gives: tgbot: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped why it has debug_info and it isn't stripped?
𝘞𝘦𝘢𝘳𝘪𝘯𝘨𝘔𝘦𝘥𝘢𝘭
Engineer
Can i ask you for electronic engineer which programming languange should i learn
Most chip development is done with C++/ SystemC C++ class library where bit accurate models of the chip/subsystem are developed to iterate quickly on architecture exploration of chips and sub blocks. You can have a loosely time C++ model which shows what the output behavior of the system will be, there are also clock cycle accurate C++ models too.
Engineer
I am developing a C++ model of a CPU, I have a clock cycle accurate model which is also a bit accurate model that I am still working on.
Ziky
Or his intention might be to work with PLCs which have they own obscure languages...
𝘞𝘦𝘢𝘳𝘪𝘯𝘨𝘔𝘦𝘥𝘢𝘭
../src/message.c:27:9: note: 'snprintf' output between 1 and 1024 bytes into a destination of size 512 27 | snprintf(man_res, MAN_SIZE, "%s", line); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ why it says this? is this the right way to use snprintf? MAN_SIZE is 512, line is 1024chars and man_res is 512chars
𝘞𝘦𝘢𝘳𝘪𝘯𝘨𝘔𝘦𝘥𝘢𝘭
Warning message looks quite clear. What don’t you understand?
because I wrote that he needs to write MAN_SIZE to man_res from line...
Alexander
because I wrote that he needs to write MAN_SIZE to man_res from line...
Nope, it says that buffer line of 1024 bytes long is written to smaller buffer man_res of 512 bytes
𝘞𝘦𝘢𝘳𝘪𝘯𝘨𝘔𝘦𝘥𝘢𝘭
Nope, it says that buffer line of 1024 bytes long is written to smaller buffer man_res of 512 bytes
and that's what I want, I mean, it has to truncate the 1024 buffer to 512 buffer
Alexander
and that's what I want, I mean, it has to truncate the 1024 buffer to 512 buffer
sprintf as it’s written in your code won’t truncate anything
Alexander
sprintf as it’s written in your code won’t truncate anything
If you really want to truncate line buffer, you may want to specify length in %s(like %.511s) or use some other way
Taha Eid Mohamed (4)
in php we can use madelineproto to make clients apps what can we use in c++
klimi
in php we can use madelineproto to make clients apps what can we use in c++
if you have asked for telegram client libs in c++ it would have been more helpful :) https://core.telegram.org/tdlib/docs/index.html#using-cxx https://github.com/reo7sp/tgbot-cpp
Manny
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit cannot open source file "filesystem". Please run the 'Select IntelliSense Configuration...' command to locate your system headers What's the error
Manny
On running the code it shows fatal directory I downloaded the mingw w recently but it shows GCC version 6.3.0
Anonymous
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit cannot open source file "filesystem". Please run the 'Select IntelliSense Configuration...' command to locate your system headers What's the error
It means that your compiler/IDE has not been able to find the location of your header files. There is usually a configuration option in your IDE to set the location of header files and libraries for your project. Just search for the corresponding setting and do the needful
Anonymous
On running the code it shows fatal directory I downloaded the mingw w recently but it shows GCC version 6.3.0
Don't use mingw. Use msys2. Read the corresponding post in the resources section for this group. The link to that group is in the pinned post
Chat Boss
Balaji Balu sent a code, it has been re-uploaded as a file
Balaji
what is wrong in my code
Balaji
hiii
AlanCcE
what is wrong in my code
The if statement needs an expression
AlanCcE
And just for the sake of clarity, would probably be better to make a "is_prime" function that would return a boolean value which you could use into this if statement
Aziz
are there any groups for Java in english and/ or Russian?
Anonymous
Guys, if the sort algorithm sorts values ​​in ascending order, does there have an algorithm that sorts in descending order?
Danya🔥
Open cppreference and check examples
abel
What's this paragraph means? "You should have something like /build* in your .gitignore , so that users can make build directories in the source directory and use those to build. A few packages prohibit this, but it's much better than doing a true out-of-source build and having to type something different for each package you build."
abel
Is he suggests me to make a directory under the project to build?
abel
Is that's correct meaning of out-of-source build?
aronCrow
If you don't have .gitignore file in the root folder of repository, then you can create it
Anonymous
Hello? Are there any free resources which is comprehensive for learning c++?
Anonymous
Is that's correct meaning of out-of-source build?
Out of source build means that the build objects will be generated in a directory separate from that of your source repository. This is a good idea because it ensures that your source directory isn't polluted with object files and stuff making it cluttered. Also this has the additional benefit of ensuring that people don't add the temporary build objects to your version control by mistake.
Anonymous
Can you recommended me any free comprehensive c++ learning resources?
Anonymous
Oh... There is already a link i rules for that... Sorry for asking
Tokin
Can you recommended me any free comprehensive c++ learning resources?
Dunno about comprehensive.. But try learncpp.com
Utpal
Could anyone explain "Function Overloading" in simplest terms please ?
Doremon
Could anyone explain "Function Overloading" in simplest terms please ?
Suppose you are teacher said that to create 3 Functions . 1 For Addition of 2 number 2. For addition of 3 numbers 3. For addition of 4 numbers In this case our approach will be we create fun1 fun2 fun3 named functions that will perform that work but Function overloading is a concept with this we can give same name to all that functions But there is Some rules 1. Numbers of parameters 2. Type of parameters 3. Order to parameters Not done with changing return type You can refer internet for different examples Overally it is used just for simplicity for identifier names .
Er Manu
Could anyone explain "Function Overloading" in simplest terms please ?
Usually function overloading is used to execute the same function but with different interfaces, as parameters type, parameters numbers etc, a function isn't identified by only its name but also by its interface. operator overloading works in a similar way.
Anonymous
Aze sent a code, it has been re-uploaded as a file
@ItachiUchiha420 Errm is there a question?
Ighor
@ItachiUchiha420 Errm is there a question?
can you please check what happened before this message? If I know which event caused that I can fix it
Anonymous
can you please check what happened before this message? If I know which event caused that I can fix it
Nopes the message was not for the bot or for you but for the person who posted the code. The point is that the person posted a chunk of code without any related question.
Developer
Hey anyone can solve this asap please
Shashank
C++ full notes
Anonymous
The message was posted today
Abdelghani
how to check what line of my c code has a segfault
Danya🔥
Abdelghani
is there any way to do that from terminal
Danya🔥
is there any way to do that from terminal
https://youtube.com/playlist?list=PLxNPSjHT5qvu27ax_VIAalaGIEjxj2Bp0 Checkout videos here Specifically on gdb, address sanitizer and valgrind
Abdelghani
🙏
p
a=5 B=++a + a++....? Why does the value of b come to be 13 not 12 in the above expression?
Anonymous
a=5 B=++a + a++....? Why does the value of b come to be 13 not 12 in the above expression?
This is undefined behavior. There is no right answer. See Undefined behavior
Anonymous
people tell me dont use scanf
mito
This is undefined behavior. There is no right answer. See Undefined behavior
Why does it say pre C++11 undefined ? Does that mean it's not undefined in C++11 and onwards?