Stefan
i don't know why but that's the way it is
Ludovic 'Archivist'
i don't know why but that's the way it is
Never happened to me, it would make your code impossible to link against
Ludovic 'Archivist'
Since every object file may hold a different layout of the data
Ludovic 'Archivist'
What implementation do you use? Which flags leaded to this?
Stefan
i cant seem to find my ugly macro oop hack in my stash of history projects...cant show you somehow anyway
Stefan
i used to think of writing a language based on that
Ludovic 'Archivist'
Anyhow, you can implement inheritance in C, and keep things plain old data, you can also implement struct that are not pod
Stefan
nope, i think i've deleted it cause it is too abominated, but i still had plan for my language
Azrul
I want to ask something
Azrul
What is the best compiler for all of you??
BinaryByter
G++ or Clang
Stefan
tcc is cute
BinaryByter
as opposed to Qt
s
Ya i m human
Gourav
c++ tutorial?
j
fopen("TestFile1.txt", "r");
j
doesnt work for me
j
directory not found
j
it only works if i write the wholle path to the file
j
but i wanna use a relative path
j
so that it points to the folder where my project is
j
im using qtcreator ide
j
fopen(".\TestFile1.txt", "r"); doesnt work either
Anonymous
HI
klimi
hi avast
Anonymous
I SEEE PEOPLE ARE BUSY HERE
Tobias🐾🚲
hi avast
Sheesh dont scare me like that, for a second i thought it was the actual snakeoil.
j
cansbdy help me out
j
?
klimi
what is you file structure?
j
txt
klimi
if you write just TestFile1.txt
klimi
it has to be in the same directory
j
it doesnt work either
klimi
IT HAS TO WORK
j
it doesnt
klimi
well
klimi
then you have somewhere error
j
/home/javi/Documents/Code_Project/c/P1/file.txt works
klimi
and where do you have your executable?
j
im running it from an ide
Vishnu
Hi friends Iam abeginner in c++ Anyone please explane about gcc
Vishnu
Ya gcc compiler
klimi
im running it from an ide
and where do you have set your run folder?
j
`is that the project directory?
j
@Kurimi
klimi
idk i ahvent used it
klimi
but it im using some ide i should be familiar with it first
klimi
if you use realitive path
klimi
its from the executable
klimi
or changed by ide
j
/home/javi/Documents/Code_Project/c/build-P1-Desktop-Debug is my workin directory
Sito
Hi, I have a question: which option do you consider the best for a switch case? uint TransformTypeOption1(const typeA& i_typeA) { uint o_typeB; switch (i_typeA) { case typeA_TYPE_VERTICAL: o_typeB = typeB::kVertical; break; case typeA_TYPE_HORIZONTAL: o_typeB = typeB::kHorizontal; break; default: o_typeB = typeB::kUnknown; break; } return o_typeB; }uint TransformTypeOption2(const typeA& i_typeA) { switch (i_typeA) { case typeA_TYPE_VERTICAL: return typeB::kVertical; case typeA_TYPE_HORIZONTAL: return typeB::kHorizontal; default: return typeB::kUnknown; } }
Sito
would propose any other?
Ludovic 'Archivist'
It is also how I write statemachines
Ludovic 'Archivist'
Return > Break
Sito
same as I thought
Sito
ty
Anonymous
😅
DaviC
Hello, i have a question regarding the instruction of a riscv architecture, to represent a negative immediate value (that is sum to a register for example) which is the correct way? I mean, i have register with value "10" and an immediate value "-2", the result should be 8 and insted my register is 4104
DaviC
I know about the 2's complement but i can't reach the correct result
Sara
Sara
Hi, i have a problem in my c++ program which is “i have to count and print number of students pass os fail in a given rang of students”
Sara
My problem is there is no output
klimi
Hmmm
klimi
Are you sure the loop is executed
Anonymous
Debug
klimi
The numbers you given
klimi
Test for 1>=10
Sara
Are you sure the loop is executed
What do you mean exactly?
klimi
Which is false
klimi
So it doesn't execute
klimi
So the whole for block is skipled
klimi
And the program ends
klimi
With no output
Mihail
Should be i--