olli
istream*
BinaryByter
I advise you to
1) clean up your code
2) make your code as minimal as possible, remove extra features
3) look at where you access a vector or array
BinaryByter
BinaryByter
huh?
BinaryByter
no
BinaryByter
its a basic type implemented by the compiler
BinaryByter
rather
BinaryByter
its a bitfield of size 8 * 4
Anonymous
I want a code to populate a 2D array
olli
Don't rely on size of int, long and so on
BinaryByter
olli
The size of a char is defined however
BinaryByter
Okay
BinaryByter
how is an int defined?
BinaryByter
BinaryByter
time to read
olli
There are five standard signed integer types : “signed char”, “short int”, “int”, “long int”, and “long long int”.
In this list, each type provides at least as much storage as those preceding it in the list.
[basic.fundamental#2]
BinaryByter
BinaryByter
olli
you mean bytes?
BinaryByter
no
BinaryByter
bits
olli
well yes to bytes and bits
BinaryByter
I could have
sc = 8b
si = 8b
i = 8b
li = 8b
lli = 8b
BinaryByter
would be compliant
olli
to have fixed size types use uint8_t, uint16_t and so on
BinaryByter
ok
olli
but do note, they are unfortunately marked as optional by the standard (in cstdint)
BinaryByter
Hoy you all
BinaryByter
BinaryByter
WHY?
Yunus Emre
#include <stdio.h>
#include <conio.h>
#define BOYUT 10
int main ()
{
int s[10], j, total;
for (j=0;j<=9;j++){
printf("please one integer\n");
scanf("%d", s[j]);
total += s[j];
}
printf("total %d", total);
getch();
return 0;
}
Yunus Emre
What's wrong?
BinaryByter
klimi
kill me...
Yunus Emre
tell us!
Dude do you know what's question mark? if i know why bother to people
BinaryByter
olli
WHY?
C++ does not define an architecture and it's impossible to allocate 32 Bits on a 36Bit architecture
klimi
IM FUCKING TRYING TO USE PYTHON3 INSTEAD OF BASED PYTHON whi h is 2... fuycking hell
BinaryByter
BinaryByter
wat?
BinaryByter
klimi
NO emacs is shit
BinaryByter
gerlang is better :)
klimi
i just
klimi
told 5x to it how to do it
klimi
and its doing fucking nothiong
BinaryByter
BinaryByter
BinaryByter
what have you tried so far?
BinaryByter
Do you already think to know what's wrong?
BinaryByter
have you tried performing google searches?
Ariana
BinaryByter
olli
BinaryByter
BinaryByter
Yunus Emre
olli
Thanks a lot
You're welcome. (You need to take the address you want to store the value at, to explain to change)
Ariana
If you’re trying something and it doesn’t work, try to isolate the error, try out a shorter program first, see if it works, then slowly add
Aman
Thanks a lot
Try to dry run your code. You will be able to prevent some errors in any program
Yunus Emre
Yunus Emre
BinaryByter
so that indicates that you didn't double check your code
Ariana
We should probably have a tutorial on how to debug code,
BinaryByter
BinaryByter
Hi
Ariana
A lesson on debugging code is like needed for ppl who are new
BinaryByter
Ariana
I also get questions irl like
Hi hi i need to submit this in 5 minutes why doesn’t my code work
BinaryByter
Feel free to revert this, other admins :)
BinaryByter
klimi
i dont fucking care i have my own shitload of troubles