Anonymous
hi im new to C++ const char * foo = "example"; const char* foo2 = foo is there a way to convert or cast const char* foo2 variable to utf8 without changing to prefix u8"example"
You will have to use facets and codecvt. It is not very straightforward to use but once you get the hang of it, you can use them fairly easily for all your localisation and internationalisation needs.
N
Hi i get this error . i want build mozilla for windows lld-link: error: undefined symbol: public: virtual enum nsresult __cdecl
Notaxmar
So something is bothering me. Can you put a C file in an image. I'm doing it for educational purposes so I'm not gonna make a malware because I'm a beginner in programming and I am learning C but how do i put a C file in an image like merge? On android💀is there any third party app for it?
Kartik
Heya guys, can anyone tell me if I can take input from user without pressing the enter key? Like just a character (just like getch() used to do). I want to do this on linux.
Anonymous
Heya guys, can anyone tell me if I can take input from user without pressing the enter key? Like just a character (just like getch() used to do). I want to do this on linux.
https://stackoverflow.com/questions/1798511/how-to-avoid-pressing-enter-with-getchar-for-reading-a-single-character-only
Kartik
Thanks
Anonymous
Got it, it can be done with ncurses👍
Yes ncurses is one of the solutions mentioned in that link.
Anonymous
page isn't available
It's available it's a tool call steghide it is a command line tools you can try googling the name
YS
Hi guys can you help me and provide 2 solution of a program actually I'm new in c++ and it's my first programming language
YS
Write a program in C++ to implement stack operations. Write a program in C++ to implement queue using array.
DaviChan
pretty sure it is
ゾロ
Is there any books, blog or document demonstrate about the compiler behavior when compiling C++ ?
ゾロ
Behaviors of example "if the default constructor is not written in the program code, the compiler will automatically add some functions"
Billionaire
Anyone on? I want help with a code in c
Billionaire
I want to take input as a character for the months (eg : jan, feb, etc) and print output as integer (1 for jan, etc)
Chat Boss
M M sent a code, it has been re-uploaded as a file
M
M M sent a code, it has been re-uploaded as a file
Note: This program uses the strcmp function from the string.h library to compare the input string to the desired month strings. Also, it's case-sensitive, in case you are entering the month in any other case than lowercase it will give invalid month entered.
Anonymous
hi does anyone here know how i can turn negative numbers into positive with out using any lib
Anonymous
klimi
?
multiplication
Anonymous
ha ?
zak
math
Suka
?
int n=-100 n=n*(-1)
Anonymous
omg ahahha
Anonymous
well yeah -*-=+
Anonymous
yeah but i have to ask about something else too
Anonymous
i will try something and come back
Anonymous
ゾロ
Advanced C & C++ compiling, for example
Thanks, Jose I will check it.
Jillur Rahman
/start@MissRose_bot
Hizmu(Vlad)
/start@MissRose_bot
YS
is that your homework by any chance?
Practice file program that i don't understand what's the logic i use for program
YS
Ok
Anonymous
what preprocessor and preprocessor directive?
● Igor
not completely off topic... but what is required build an application that are drawn on top of others and is transparent, like screenshot tools? i don't know how is it called... overlay app?
● Igor
but i don't want it to be a window, because it would capture input and I want it to be only always visible
Anonymous
~ your_number + 1
u to smart for me -42 +1 = positive number hahahaha
Anonymous
the vm was not a question
Anonymous
?
nvm never mind
Anonymous
i just had to number * -1 if its less then 0
Anonymous
and it will turn it into positive
Hussein
i just had to number * -1 if its less then 0
yeah but using ~n + 1 is faster
Anonymous
i ask that question when i was stressed then i took some time and remembered that -*-=+
Hussein
so that the CPU won't have to add repeatively
Anonymous
Hussein
why what does ~ mean
Unary complement (bit inversion)
Hussein
It is a bitwise NOT operation
Hussein
nvm never mind
I got really confused thinking that u were talking about non-volatile memory😁
Anonymous
klimi
Can someone explain this?
like... what it is ? or what it does? or what do you mean by "what"?
klimi
What's it and what does it do
whew... zero effort... https://en.wikipedia.org/wiki/Preprocessor https://cplusplus.com/doc/tutorial/preprocessor/
Chat Boss
Sid Xid sent a code, it has been re-uploaded as a file
Olivia
what mistake is there while printing friquency in this code?
Olivia
frequency**
Ujjawal
If a same macro is defined in so many files( let's say .CPP) . And we want to make change in its value such that it is reflected everywhere! Is there any way we can do it in one go rather than individually changing in each file