Prince Of Persia
hmmm which C book do you recommend?
Prince Of Persia
something to learn modern C from 0 like a beginner
Anonymous
find a teacher ....
Anonymous
find a teacher ....
no necessary at all
Prince Of Persia
find a teacher ....
I am a C++ expert
Prince Of Persia
so have no need to that but I want to learn C from 0 to learn absolute C without anything related to C++
Anonymous
and learn assemble the same time
Anonymous
Compilation Principle
Prince Of Persia
and learn assemble the same time
I'm learning assembly right now and C isn't always about writing kernel for oses
Anonymous
for example?
Anonymous
embed ?
Anonymous
close hardware too
Prince Of Persia
embed ?
you know many vms are in C
Anonymous
vms
Prince Of Persia
like Python (which has something like a vm - its interpreter - inside it)
Anonymous
virtual machine?
Anonymous
cython?
Anonymous
If you're familiar with C++, there's nothing else you need to know with c
Prince Of Persia
virtual machine?
I called it vm to be able to mention JVM is also in C
Anonymous
In fact, It was write by cpp
Prince Of Persia
If you're familiar with C++, there's nothing else you need to know with c
C++ isn't C I don't even use malloc and realloc and ... in C++ I just use vector and sometimes new or ...
Anonymous
and recent edition can't be compile with just cpp, you need previous java jvm
Prince Of Persia
In fact, It was write by cpp
what about other things like gtk
Anonymous
excuse me for that english was not my mother language, sometimes my expression was not perferable
Anonymous
what about other things like gtk
bottom need more fast excute speed,but as a use,other program have gtk interface
Pavel
C++
Then you should be aware that you do it in C way, for C++ there are better more safe constructs, like std::vector and std::array
Anonymous
I trust I will never modifiy gtk source code
Anonymous
only when you have demond ,learning C is needed
Prince Of Persia
I trust I will never modifiy gtk source code
😁but someone may do something like that or at least I need the knowledge of C to be a better programmer in C++ and other languages and knowing C makes me much better to program in assembly as I learning
Anonymous
if you are a expert about cpp,don't learn C like a newbie
Anonymous
when encounter a problem, find relative knowledge to solve it
Anonymous
by the way, why you want to learn C
Anonymous
what is that apply condition?
Prince Of Persia
by the way, why you want to learn C
because I have seen some programmers call C functions inside assembly code
Prince Of Persia
and I'm learning assembly
Prince Of Persia
idk is it good or bad practice to code half in C and half in assembly and calling C functions inside assembly
Anonymous
https://godbolt.org/
Anonymous
recommend a web site to learn C and assemble
Prince Of Persia
recommend a web site to learn C and assemble
actually there is a book named low level C which is both C and assembly
Prince Of Persia
https://godbolt.org/
I have used this website before
Anonymous
only some work that C can't work , we will write assembly
Prince Of Persia
Sorry, what is the name of book?
Low-Level Programming: C, Assembly, and Program Execution
Anonymous
like hardware, register ,bus and so on
Prince Of Persia
only some work that C can't work , we will write assembly
or in my case sometimes you need to use IDA or any disassembeler and all you can see is assembly
Anonymous
could I get what is your job about?
Anonymous
if (foregraund) { threadId = GetWindowThreadProcessId(foregraund, NULL); keyboardLayout = GetKeyboardLayout(threadId); char crrProg[256]; GetWindowText(foregraund, crrProg, 256); " GetWindowText(foregraund, crrProg, 256); " " crrProg" Argument of type "char" is incompatible with parameter of type "LPWSTR" how can i fix this?
Prince Of Persia
could I get what is your job about?
it's not my job but I want to learn reverse engineering
Anonymous
I'm sorry, but I'm not familiar with that.
Prince Of Persia
I'm sorry, but I'm not familiar with that.
No need to be sorry And you now know why I want to learn C
Saro
idk is it good or bad practice to code half in C and half in assembly and calling C functions inside assembly
It depends from situtation. For example if your processor have some specific functionality you can implement some functions in assembly for using that specific commands and call that functions from C. That will be good for perfomance
Anonymous
No need to be sorry And you now know why I want to learn C
yeah, I don't have experience in reverse engineering ,so I can't offer any effective advice
Prince Of Persia
Anonymous
😂
Prince Of Persia
Doriush
/get cbook
Carl Joseph
Hello can u guys help how to code unique words using stdio.h, getchar with eof, and single dimensional array?
Carl Joseph
How to print unique words
Saro
Hello, learn linear search, loops, functions, arrays.
Saro
nested loops
Anonymous
Hi peploe, I need help! I created a program for print lines of the triangle Pascal. So when run and insert values betwen 1 to 12 it runs and show the triangle no problems, but when insert values > 12 it's returning numbers negatives and aleatorys. I don't know what's going on. https://github.com/Leumim2020/ExercisesCpp/blob/main/arrays/38/main.cpp
Anonymous
   ~/Doc/arrays/38  ./a.out  ✔️  4s  numberRows: 15 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 126 84 36 9 1 1 10 45 120 210 252 210 120 45 10 1 1 11 55 165 330 462 462 330 165 55 11 1 1 12 66 220 495 792 924 792 495 220 66 12 1 1 4 24 88 221 399 532 532 399 221 88 24 4 1 1 0 1 5 14 29 44 50 44 29 14 5 1 0 1 1 1 -4 -1 2 4 7 9 9 7 4 2 -1 -4 1 1
Anonymous
maybe overflow? use size_t instead of int
yes, I'm going to try and later say.
Saro
What?
If you want to code that program you have to know what I mentioned
Dark
How can someone share a person?
I thought he said he want to share me books for it bro
Дон
Why is std::cout works unusual for const char*, it shows the contents of string, not address?
Pavel
Why is std::cout works unusual for const char*, it shows the contents of string, not address?
Well, usually people expect the string to be printed, like std::cout << "hello world";
Дон
Well, usually people expect the string to be printed, like std::cout << "hello world";
Ok, but I expect address :) Then tell me please how to get the address of const char*?
Saro
Why is std::cout works unusual for const char*, it shows the contents of string, not address?
when you give const char* it puts all bytes to buffer until it reaches to \0 and prints.
Pavel
Ok, but I expect address :) Then tell me please how to get the address of const char*?
I think you can cast to void* with static_cast or just (void*)addr
Дон
Ok, but I expect address :) Then tell me please how to get the address of const char*?
I mean, I want to do something like this: char* a = new char[10](); const char* b = "Something"; strcpy(a, b); for (auto i = &b[4]; i < &b[7]; ++i) { a[i] = 'l'; } Yes, it's CE
Дон
The example may seem strange, but the point is to correct the for-loop
Дон
I didn't notice the answer while I was typing. The question is irrelevant, write void* everywhere
Saro
Why is std::cout works unusual for const char*, it shows the contents of string, not address?
if you want to print the address of const char* you can cast it to long const char* text = “Simple text”; std::cout << (long) text << std::endl;