Alviro Iskandar
Anonymous
\Device\NUL
why yes
I never learn Windows API, so i don't know why
レッギ
レッギ
And make compare HIWORD(lParam) with ascii code from english keyboard
-
Anonymous
Anonymous
how to get statement
Artur
anyone here has an experience crosscompiling c++ code for microcontrollers using docker ?
coal
レッギ
how to get statement
Use switch case. For example
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
Switch(wParam)
{
case "your ascii code here":
[Do somethinf]
break;
}
Anonymous
can anyone please explain what is the below code doing
Anonymous
// Return the number of digits in d
int getSize(long d)
{
string num = to_string(d);
return num.length();
}
// Return the first k number of digits from
// number. If the number of digits in number
// is less than k, return number.
long getPrefix(long number, int k)
{
if (getSize(number) > k)
{
string num = to_string(number);
return stol(num.substr(0, k));
}
return number;
}
Shubhuu
Hey guys can anybody let me know how I can start the C++ language from basics and Excel it with time to a competitive level ?
Your senpai : )
hey
Shubhuu
Your senpai : )
Shubhuu
Your senpai : )
Here any experienced c++ programmer i want to ask something.
Prince Of Persia
Tushar
You need to read books for this as no YouTube video will go in so much detail
Tushar
tbh I don't know the book which you need
Tushar
But you can search in google
Tushar
I am sure you will get something to help you out
Your senpai : )
Your senpai : )
🥲
Pavel
Actually everyone say to create some projects or contribute in community but how can i do this i dont have any guide
Well, first you need to decide what you want to build, for example I started from building a simple 2D game (well, in the end it turned out that it's not that simple and after 8 years it's still not completed, but I learned a lot).
There are other rabbit holes like writing OSes, browsers, or scripting languages, which is fun, educating and something that you can mention during an interview, but likely not something that will be ever finished in production quality.
But it doesn't need to be big (just when you don't have experience it's easy to underestimate time to develop something), but it has to be something that is fun to you.
About contributing, a lot of programmers who work on open source project need contribution. It is likely some boring parts (at least for them), but for you it can be a interesting experience. Some of your friends may be working on something, or you can ask around if someone needs extra hands on their project. E.g. I need a person who want to learn Opengl to rewrite a render layer of my engine (yes, that one that I mentioned above :))
Tushar
participate in hackathons
Tushar
you learn more
Tushar
mlh.io is a good site for it
klimi
Are you advertising a discord server where people can hire people to solve their homeworks?
klimi
Please answer my question
Your senpai : )
Is DSA concepts same in mostly languages?
klimi
why do you need to read rules for clarifying your message? I am confused
Ludovic 'Archivist'
Advertising is a no-no. Else I would be doing it everyday xD
Otumian
Tushar
Tushar
Sorry for the late reply
Tushar
I got to know about it from my sister, though I haven't taken part in any uptil now, people from all around the participate in it, so it's a good link that I am sending to you
Tushar
Not advertising anything
Tushar
By clicking on the message that klimi sent on why are you adversiting a discord server..... It's pointing to my message about the mlh.io site, that's why sent the above messages to clarifiy
%Nikita
%Nikita
%Nikita
%Nikita
coal
Alviro Iskandar
I understand your intention, the pointer arithmetic size depends on the type, for example like this:
#include <stdint.h>
#include <stdio.h>
int main(void)
{
void *arr = (void *)0x1ul;
int32_t *ptr1 = arr;
int8_t *ptr2 = arr;
printf("%p %p\n", (void *)(ptr1 + 1), (void *)(ptr2 + 4));
return 0;
}
Both ptr1 and ptr2 are pointing to address 0x1.
The output of that printf is 0x5 0x5 because the syntax ptr1 + 1 adds the pointer value by 4 and ptr2 + 4 adds the pointer value by 4 too. The reason is that sizeof(int32_t) is 4 and sizeof(int8_t) is 1.
Adib
#ask
Hello people, i have question about regex, probably anyone know the answer?
https://www.quora.com/unanswered/Why-is-all-in-regex-symbolized-as-char-Why-not-using-other-character
-
Hello guys. Could you give me an idea ? I need remove all 5 from an integer, leaving an order of digits the same
-
For example, 461525 should be 4612
-
I did using while loop , but in this case an order is not the same. Like 461525 was 2164
Anonymous
Tushar
-
#include <stdio.h>
int main(){
int num,digit,newnum=0;
printf("Enter a number: ");
scanf("%d",&num);
while (num>0){
digit=num%10;
if (digit!=5){
newnum=newnum*10 + digit;
num=num/10;
}
printf("%d\n",newnum);
return 0;
}
Tushar
Tushar
cause the num is now to be reversed right so then do another while loop on it
Tushar
you got it right?
-
Yes I will try now
Tushar
okk
-
but how to do it in only 1 loop? I want to do it only in 1 loop cause with 2 loops it will be a long code
Tushar
with one loop you can create a count variable containing the total number of digits that are there in the input, and you can decrease the count after every iteration ( think of a loop within a loop and some condn that you need to figure out) whenever it gets the matching number so in the while loop just create a if condn (besides the loop within a loop )that when the count becomes zero and another variable is to be created too which is 0 and it increments with the number of Matching numbers that are there. So create a if cond with both of these AND operation will be used
Tushar
This is way that I was able to put it across to yo
Tushar
Sorry if it doesnt make sense, typing in a hurry
-
I got confused
-
But thank you for your attention
Anonymous
Photo are not allowed to post??
Anonymous
I want to post a ques
-
@kickstart22 thank you very much. I did it with 2 loops. It works as I want. And code is not long