« first day (2 days earlier)      last day (22 days later) » 

14:47
@aderchox Today?
 
2 hours later…
17:00
@Archer Yes
Been online the whole day just didn't notice your message
 
1 hour later…
18:19
@aderchox hi
hi
I'm currently doing something else but I think I'll be free in 15 minutes
18:31
Ok, I'm back.
@aderchox Do you know about codeblocks?
I've heard about it. It's just another IDE.
But older than vscode.
I downloaded it because I was facing problems with vscode...
What problems?
@aderchox Multiple bashes being created and I couldnt properly understand what exactly was happening.
18:35
It's not something weird, just as you can open multiple tabs on your browser, you can open multiple bash terminals
CodeBlocks can not connect to WSL, so you will have to use things like MinGW or CYGWin which are not my personal favorites.
@aderchox But it will suffice for my purposes I guess?
Just need C for 4 months...Then will go back to Java.
Use whatever that feels better to you.
@aderchox VSCode isnt compiling if there's a math package included....
May I see the code?
include <math.h>
#include <stdio.h>
int main(void)
{
double first, second, first_sqrt, second_sqrt, sum_sqrt;
printf("Enter first number > ");
scanf("%lf", &first);
first_sqrt = sqrt(first)
printf("The squareroot of the first number is %.2f \n", first_sqrt);
return 0;
}
18:40
@Archer
Works for me without any problem.
Try this:
#include <math.h>
#include <stdio.h>
int main(void)
{
double first, second, first_sqrt, second_sqrt, sum_sqrt;
printf("Enter first number > ");
scanf("%lf", &first);
first_sqrt = sqrt(first);
printf("The squareroot of the first number is %.2f \n", first_sqrt);
return 0;
}
@aderchox what changes have you made?
You'd forgotten the semicolon on the 8th line
and your first include didn't have a pound sign (#)
/tmp/cccHAair.o: In function `main':
/mnt/c/Users//Desktop/C/math2.c:8: undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
The terminal process terminated with exit code: 1
process to compile is: Ctrl Shift K -> + sign right?
It's not working for you?!
@aderchox You can see the error above
@aderchox Do you have TeamViewer?
18:44
Yes
Can you use it to see please?
1 309 185 205
526ijr
Sorry my Anti-virus has a problem with Teamviewer
anydesk ?
@aderchox 501 741 470
18:50
done
OK, can you help me with one part of codeblocks also please?
I'm not sure
what's that about?
it says: Starting the debuggee failed: No executable specified, use `target exec'.
ok
let me see it
ok?
@aderchox if we keep 2 files in same project it gives error...
18:55
you had empty .c files in your project and the linker was trying to link them to your program, but didn't find their main function.
@aderchox I deleted their content later...
Wait see, let me try again.
@aderchox Now there's a program with debugger...
If I do debug-> run , it gives an error
Oh I ended the wrong task
Can you end the codeblock's task?
and then reconnect the anydesk?
@aderchox OK
One sec
I want a project with multiple files having main
Is that possible?
Like in VSC its possible
no, not only main, but ANY other functions can not be redefined in C
@aderchox How in VSC different files can have main then?
19:09
It's not possible in VSC too
unless they're not part of the same project
Is that clear?
@aderchox math2, learn, learn2 all have main function
yeah, they're not part of the same project. because vscode does the building differently. CodeBlocks "HELPS" you with your building process. But for VSCode you have to write the build script yourself and in there, link the sources that are related to each other in the right order.
@aderchox what is building process?
OK that question has a LENGTHY and COMPLICATED answer, but in a nutshell and in easy layman's terms, it's a somewhat complex step in which your .c files stick together and turn into those files executable by your OS.
If you want a more complete answer, read here:
C is unnecessarily complex :/
19:17
Haha, it's not used for ordinary small tasks. Compilers are written in C, OSs are written in C, databases are written in C, programming languages (PHP as an instance) are written in C.
It's a middle language, which is both close to hardware and to human understanding
You're not going to learn it over night. But it's dope.
@Archer Gotta go now.
@aderchox Okay, see you later!
See you, bye
@Archer
Are you still there?
How can I find this chat room from SE ?
By the way, I have a whole 1 hour video in which I explain the building process thoroughly but it won't be useful if I share it with you because 1. It's in my own language! 2. I don't remember any of it, it's been two years passed the time I recorded it and if you ask me something about it I won't be able to answer :D
@aderchox Type "room for archer ..." in all rooms search bar section.
filter rooms

« first day (2 days earlier)      last day (22 days later) »