Prince
Please I neeed someone to take me through coding. I’m a beginner
Prince
Please will you help me?
²
Please will you help me?
you do you want to start?
Prince
Yes please If agreed we can make arrangements on the time and days
²
read this books
klimi
okey
I think he wanted private lessons/mentoring
Hanz
I was too cheap to pay $10 a month for copilot, so I made my own - A Beautiful Mind https://haghiri75.com/en/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own/
Hanz
uhm?
Not me, it was a blog post from internet
Hanz
ye but... why?
Idk, I just feel like it
Hussein
I was too cheap to pay $10 a month for copilot, so I made my own - A Beautiful Mind https://haghiri75.com/en/i-was-to-cheap-to-pay-10-a-month-for-copilot-so-i-made-my-own/
all our development tools are open source, and if it wasn’t, it would be a nightmare for us devs to make our programs cross-platform software development will be so expensive why OpenAI refused to release GPT-3?!!
Ольга
struct pair {   union   {     int first_int;     float first_float;   };   union   {     int second_int;     float second_float;   } } Hello everyone, I can't figure out what a pair of structures is in C. I found an example, but I'm not sure what it is? Maybe someone can explain. I will be grateful for any help. Maybe someone knows what is union and why I need use it
adnanhossainme
Anyone tried to make a downloader script using c++ from yt
Anonymous
many online sites offer yt dn
Anonymous
and even some open source soft
klimi
many online sites offer yt dn
pretty sure their violate Youtube ToS
hello
char c; char ch; printf("Enter a character \n to stop program type ~"); scanf("%c", &c); if (c >= 'A', 'a' && c + 10 <= 'Z', 'z') { printf("%c", c + 10); } else if (c == '~') { printf("End Of Program"); return 0; }
hello
in trying to make this start counting from a again if the input +10 is bigger than z how can i do that?
Anonymous
using mingw gcc to compile some c code - keeps saying no input file
Anonymous
how come
Anonymous
i have Debian installed as sub system could compile it there and run - however hmm over complicated
klimi
the command
Anonymous
C:\MinGW\bin>mingw32-gcc.exe make path to a dir
klimi
C:\MinGW\bin>mingw32-gcc.exe make path to a dir
like you are calling? mingw32-gcc.exe make path to a dir
Anonymous
yes
klimi
yes
well... you sure there are files named "make" "path" "to" "a" "dir"?
Anonymous
there is a Makefile there
hello
it works fine for me with the comma if you say its better not to use it ok, but my goal is if someone inputs a letter
hello
if you add 10 to the variable and it surpasses z it will start from a again
hello
if i type ~ gives back return 0 and closes
klimi
there is a Makefile there
but you don't run makefile with gcc
hello
oh nvm in this program it doesnt
hello
char c; printf("Enter a character \n to stop program type ~"); scanf("%c", &c); if (c >= 'A' && c + 10 <= 'Z') { printf("%c", c + 10); } else if (c >= 'a' && c + 10 <= 'z') { printf("%c", c + 10); } else if (c == '~') { printf("End Of Program"); return 0; }
hello
in this one it does the other program is me trying to shorten it
Pavel
oh nvm in this program it doesnt
if I'm reading it correctly your if statemen always evaluates to true, because comma operator gets the result of the last part and evaluates it as bool. and 'z' converted to bool is true
Pavel
Not sure about operator precedence but in either case it's true
hello
my problem is in ASCII after the letter z it goes to other symbols and i want it to start from a again
hello
the program takes your letter you input and outputs the tenth letter after it
Anonymous
why
hello
im trying to make it so if the tenth letter after the letter you input is "bigger" than z it will start again from the start of the alphabet so if you input z it will output j the 10th letter of the alphabet
Anonymous
in which ways
Anonymous
ouch lol
Anonymous
hmm
Anonymous
i could install 32bit version of a library 🙂
Pavel
my problem is in ASCII after the letter z it goes to other symbols and i want it to start from a again
you can do it in multiple ways the more efficient one would be to check for each range, if it falls in the range, substract the smallest value (e.g. c - 'a' if it falls between 'a' and 'z'), then do the shift of that value and normalize it (wrap it around the length of the alphabet), then plus the value of the lower range back. So int alphabetLength = 'z' - 'a' + 1; if (c >= 'a' && c <= 'z') { int val = c - 'a' + 10; if (val > alphabetLength) { val -= alphabetLength; } // print val + 'a' }
Anonymous
however yes better use 64
Pavel
Something like this, but if you can add arbitrary values, you probably need to mod (%) it instead of the if
Anonymous
the reason I like 32 - it has a lot a lot of contrib packages
Anonymous
downloading 64 to see what is it
Sk
Hi
Pavel
my problem is in ASCII after the letter z it goes to other symbols and i want it to start from a again
fixed the code above, forgot about - 'a' + 'a' UPD: fixed again
hello
why do you add 1 to z-a?
Pavel
why do you add 1 to z-a?
to get length my train of thoughts: if it was consisting of one letter 'a' then the length should have been 1, so 'a' - 'a' is zero, and then I need one more
Pavel
from 10 to 20 inclusive there are 11 numbers
Anonymous
i don't see bin dir there
Anonymous
64 is a bit of a nonsense
Anonymous
mingw-w64 org
Pavel
and if it doesnt trouble you could you explain what does this mean?
mod (or % in C++) is what left from the division let's say we mod by 10 12345 / 10 is 1234 and 12345 % 10 is 5 so if you want some value wrap around 10, you add to it and mod it by 10 (6 + 10) % 10 is 6 (7 + 100001) % 10 is 8 it's not that simple if you go negative, I'm not sure what is the proper way to rotate another direction
Anonymous
mingw-get install mingw32-make however when I type make its not found
Anonymous
windows! lol
Prince
labyrinth
Anyone tried to fill the repeated field in protobuf with multiple threads? 1. pre allocate 10k entries, each returned a row ptr 2. dispatch the ptr to multiple workers that call add_values and fill in the value will this action incur other performance overhead that newbies are not aware of?
Islom M1Ö
Hello everybody
Islom M1Ö
I have to c program problem from class
Islom M1Ö
Who can help me to do it pm me please
klimi
Who can help me to do it pm me please
- we don't like this "pm" thing here. either share it for the group or don't. - we don't allow posting assigments, helping in cheating (like doing homework) - if you have problem from class, I personally think it would be best to discuss it with TAs, if you don't have this option and it is not a solo problem, you can ask here
Kaashᅠ
is learning STL, after Overall C++ Programming Language good or should i learn anything other before it?