Igor🇺🇦
we have been talking about encoding german "umlauts", but i cannot change the function that reads the txt file and saves it to an array
Can't you open files with https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-s-wfopen-s?view=msvc-160 And store them in wchar_t vector?
Asad
Hey bois. The size of the pointer is always 8 bytes yeah? No matter what data type the pointer points to?
olli
Hey bois. The size of the pointer is always 8 bytes yeah? No matter what data type the pointer points to?
yes, assuming your operating system is 64bit (Pointer size is 4 bytes on 32 bit systems)
Anonymous
Hi guys, I wanted to ask you if it's right or wrong. my professor gave me an exercise in c ++ with visual studio. The exercise is: Enter from the keyboard N integers in a vector called vector1. The number N is established by the user. Create a file called "votes.dat" for writing and save the vector. #include <iostream> #include <stdlib.h> #pragma warning (disable: 4996) int main () { FILE * N; int i; int vett [1]; for (i = 0; i <1; i ++) { printf ("enter the% d votes:", i + 1); scanf ("% d", & N) vett [i] = N; }
Anonymous
it's right?
Anonymous
No it's not
Anonymous
Read a book
Anonymous
You have no clue what you're doing
Anonymous
ok, wait
ברני
hey easey C question that I don't understand why it dosn't work... https://onlinegdb.com/ywHfG_T2M #iwannakillmyself
Deleted Account
Regarding the named pipe of windows, how do you usually deal with it during shutdown, it seems that ReadFile will block.
Deleted Account
I write a service, and then need to safely exit and cleanup resources.
Григорий
Григорий
ברני
No.
You mean the first if need to contain all the ifs in {}?
Григорий
You did: if (condition1) && (condition2) && (condition3) {} But should have done: if ( (condition1) && (condition2) && (condition3) ) {}
Anonymous
If you try to explain us what each line does, you will find what is wrong
no no no, now I understand. I create the code and then send it here to know your opinion😅
ברני
Will try ty 🤦‍♂
Anonymous
Please wana study programming please can some one help am a beginner🥺🥺🥺
Anunay
Please wana study programming please can some one help am a beginner🥺🥺🥺
https://github.com/ossu/computer-science https://ebookfoundation.github.io/free-programming-books/free-programming-books.html https://github.com/prakhar1989/awesome-courses https://teachyourselfcs.com/ https://github.com/Developer-Y/cs-video-courses
Anunay
The internet is a goddamn goldmine if you dig in the right direction
ₘₐₕdᵢ
Does any one know about domin hiding?
Anonymous
someone's got a C# group to send to me.
Anonymous
@en_it_chats
Thank you.
Xudoyberdi
Thank you.
i got a warning for that😂
Xudoyberdi
woah, thanks
ברני
Question on c... How do I calculate distance of letters? I can't find it on Google... The task is to find the biggest letter in 3 like abg And then I need to say that g is grater by the distance 6 of the smallest letter
Anonymous
'b' - 'a'
Igor🇺🇦
That c++
Yes, I noticed it. The idea is the same find min max and calculate the difference. Shouldn't be hard.
Manav
But what if the user chose the chars?
The process for finding the biggest and the smallest (alphabetical) char value doesn't depend on the user input, after you've sanitized the user input.
Roshan
But what if the user chose the chars?
Do you mean if string was a single char? Cout<<0;
Manav
No strings single chars
Can easily check the length of a c-string
Roshan
No strings single chars
Give some inputs and outputs. I don't understand....
Manav
Disallow single character and non alphabetical strings
ברני
thats what I did: https://onlinegdb.com/PtJyZ5ueN ignore the distance.. now im trying to understand how to manage the distance
Manav
%d is for double
ברני
%d is for double
No %d is for int, I told you to ignore the distance because I don't know how to manage it yet.. just wonder how to
Roshan
Ehm... Distance should be int type
Anonymous
is there a way to disable _FORTIFY_SOURCE ?
Manav
'b' - 'a'
^ they already gave you the answer a while back
ברני
^ they already gave you the answer a while back
Yes but I asked if its aski or not
Roshan
I see,. Will try now ty
Instead, for shortening use ternary operators and just put that expression in place of distance...😄
Manav
Yes but I asked if its aski or not
You mean asci? The encoding shouldn't matter since 'a', 'b' etc are encoded adjacent
Roshan
Yes but I asked if its aski or not
Chars get converted into their ASCII in implicit type conversion...
Manav
Assume 'a' is encoded as some representation N, 'b' will be N+1, 'c' will be N+2 and so on. Making 'c' - 'a' = 2
ברני
Find smallest char, then int distance = big char - small char
So now I need to do another one to find the smallest
Roshan
So now I need to do another one to find the smallest
?? dist = big char - small char; <- implicit conversion here cout<<dist
Roshan
So now I need to do another one to find the smallest
Barney, use Google translate instead - trouble understanding you... 😕
Manav
Barney, use Google translate instead - trouble understanding you... 😕
It's fine, they are doing what you told them.
manuu
Thank you 🌹
HaiNahi
Anyone want to learn C language for free 1hr daily? See my project
HaiNahi
It is allowing to send media here
HaiNahi
Not*
Anonymous
Oh
Dima
Sosig
ברני
Ops 😂
Anonymous
And why you need media to show your project?