Haikka
Hi.
klimi
hi
Haikka
Thanks.
LastPahlawan
https://stackoverflow.com/questions/35109476/is-there-anything-similar-to-javas-string-charat-method-in-c Check this.
char str[] = "Hello World"; printf("%c", str[0]); more simple 😂😂
Anonymous
Can anyone decompile so files
Anonymous
Android
klimi
yes one can
Anonymous
I am
klimi
good
Anonymous
🤔hmm
Anonymous
Why and what is this channel for
klimi
if you read the rules and the title it is for discussing c/c++
Anonymous
Ohk
Mar!o
...
Anonymous
If I want to change the row while writing into xlsx using file handling what should I type
klimi
The code
Ludovic 'Archivist'
sha256sum( date in seconds since epoch + nanoseconds * current cpu speed )
Getting random data is... very very very complicated
Anonymous
Hello w
Anonymous
Everyone
数学の恋人
hey is that kind of dynamic array allocation fine?
数学の恋人
It's a 2D array
数学の恋人
why?
olli
you could run out of memory or there might be no addressable page that fits your size requirements
olli
dynamic allocations are not guaranteed to succeed
数学の恋人
hmm... then what should I do?
数学の恋人
btw, that graph->N is of type int
数学の恋人
didn't think that way
数学の恋人
If you need a matrix, why not allocate it at once? graph->N * graph->N * sizeof(int)
graph.c|62 col 19 warning| assignment to ‘int **’ from ‘long unsigned int’ makes pointer from integer without a cast [-Wint-conversion] [c/gcc]
olli
graph.c|62 col 19 warning| assignment to ‘int **’ from ‘long unsigned int’ makes pointer from integer without a cast [-Wint-conversion] [c/gcc]
it might be a good solution to have a linear array with size N*N and compute the address with col + row * noCols
数学の恋人
what is noCols?
olli
the number of columns, or in your case graph->N
数学の恋人
oh ok
数学の恋人
it might be a good solution to have a linear array with size N*N and compute the address with col + row * noCols
so I can do like this right? graph->matrix = (int **)malloc(sizeof(graph->N * graph->N))
数学の恋人
wait I'll send struct also
数学の恋人
struct Graph { int N; int **matrix; } * graph;
olli
matrix would be int* as well
数学の恋人
struct Graph { int N; int **matrix; } * graph;
that's my struct that's why doing int **
Pavel
and when you used it as matrix[x][y] it will be matrix[y*N+x]
数学の恋人
yeah I get it now
Pavel
rather x * N + y :)
🤷‍♂️ it depends on the usage I guess
olli
🤷‍♂️ it depends on the usage I guess
sure, but since you wrote matrix[x][y] the equivalent would be x * N + y
Anonymous
Salutations.
Reica
klimi
Reica
I'm low-key feeling outta contest because in my University we still didn't introduce pointers and I see y'all using them
Not Your Dad
DIY
Anonymous
Can anyone suggest some good project ideas in C++ ?
klimi
Calculator
Anonymous
Calculator
that's pretty hardcore
Anonymous
Something else?
Pavel
Something else?
What's your level?
Pavel
Maze generator (console app)
Pavel
Text quest
Anonymous
I can do generic programing and i had also worked with STL .
Anonymous
Maze generator (console app)
Can you please explain me this it looks interesting.
Anonymous
What's your level?
I also have command on Core C++ features
Pavel
Can you please explain me this it looks interesting.
Something like that https://www.vidarholen.net/cgi-bin/labyrinth Basically an app that can generate a valid maze of a given size. There are ASCII characters that can be used for that.
Pavel
When you finish that, you can try to implement a pathfinding algorithm to find paths between two points in such a maze.
Anonymous
This seems to be pretty interesting. Do you have any project idea that makes use 0f databases?
Spirit
any idea how to flush /dev/random in c
Spirit
i keep trying to just read /dev/random but i can't seem to get rid of all of it or at least 98%
Spirit
no matter how many bytes i try to read i seem to only read about 25% at a time
Anonymous
Can anyone decompile Android so files
Ilya
It's a 2D array
It's not a 2D array it's an array of arrays
Ilya
hmm... then what should I do?
You should check allocation errors. Add some code to do this
Ilya
Something else?
Lisp interpreter
Ilya
This seems to be pretty interesting. Do you have any project idea that makes use 0f databases?
Write your home library / discography / videoteque catalogue. One of our three of them together in one application.