MᏫᎻᎯᎷᎷᎬᎠ
I see this conversation is getting very old any way
MᏫᎻᎯᎷᎷᎬᎠ
Reeta
Reeta
Anonymous
Which greedy algorithm to use?
There is no specific greedy algorithm. Greedy algorithm is a term used to refere to those algorithms which take the most optimal choice in each step. Read up on it.
Anonymous
Didn't someone just recently tell you that this is Undefined Behavior and ask you to read about Sequence Points?
Anonymous
Just don't use such peace of code. This is an example of undefined behavior (before C++17 standard, in C it's still UB). Different compilers may output 21 or 22
Anonymous
Anonymous
But there could be compilers that could just smoke your screen and there could be architectures where this code can cause a trap representation. Just because the online compilers that you tried gave you 22 as an output it doesn't mean they will give you 22 as an output everytime. It is Undefined Behavior.
Alex
/get cbook
Anonymous
https://imgur.com/a/vKUKugn is loading fonts at half resolution and upscaling a good strategy for reduced memory usage?
_dvd
Hi everyone. I cannot understand why this code fails reading signed 16 bit integers from a binary files using istream_iterator. The program has no errors but at the end of the execution the vector v is empty. If I try to read chars, it works fine. Here's the snippet https://pastebin.com/s0waHMYA
Anonymous
Anonymous
_dvd
the iterator cannot read anything different from a char
Anonymous
_dvd
_dvd
Anonymous
https://gist.github.com/mgood7123/6d2ff26cb41d297dd28968bc24a8355a is this suitible for a texture atlas optimization?
Anonymous
updated gist
Anonymous
hey, I want help for open source, I see an issue but from where can I contribute?
and how to talk with the community of that project ?
zelika
https://pastebin.ubuntu.com/p/RVKHZGg8tV/
zelika
tictactoe.cpp: In function ‘int main()’:
tictactoe.cpp:10:14: error: expected unqualified-id before ‘.’ token
TicTacToe.init();
^
tictactoe.cpp:11:14: error: expected unqualified-id before ‘.’ token
TicTacToe.start();
this is the error. but i saved the file. why it's giving the old version's error? what is my fault?
zelika
btw im beginner. so i didnt understand
~Maverick
Send the code
Anshul
How to identify why am I getting a SIGSEV
Pavel
How to identify why am I getting a SIGSEV
If you know how to reproduce it, you can build your app in debug mode (with symbols generated), then run it in the debugger and when it crashes investigate the callstack for the hints of why it could have happened
Anshul
Anonymous
zelika
Anonymous
it didnt work.
Without seeing your code we can't help you much.
zelika
which one? xox_game?
zelika
okey
zelika
https://pastebin.ubuntu.com/p/B7KT97RmnB/
zelika
i didnt finish yet. so there is so many mistake
zelika
Anonymous
https://pastebin.ubuntu.com/p/B7KT97RmnB/
First of all TicTacToe is a class. So you can't use the . operator to call static methods in it. You should instead use ::
Secondly there is no static init or start method in TicTacToe class. So how do you expect those calls to compile?
zelika
oh i understood thank you ^^
Moseh
Glad to be here @MissRose_bot
Mahin
king king
Hi,
i saw it in an article
CC = gcc # Flag for implicit rules
CFLAGS = -g # Flag for implicit rules. Turn on debug info
# Define a pattern rule that compiles every .c file into a .o file
%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
but it is just now working
king king
https://makefiletutorial.com/#automatic-variables-and-wildcards
king king
if someone knows about it , please give me a hint
Anonymous
king king
what am i doing wrong
king king
shahar@Asus:~/git/c/makefile/practice$ ls
ff.c Makefile qq1.c qq2.c
shahar@Asus:~/git/c/makefile/practice$ make
make: *** No targets. Stop.
king king
i copy this directly from the article
king king
Let's start with an example first:
# Define a pattern rule that compiles every .c file into a .o file
%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
king king
Osama
Is there any alternative to Boost DLL?
king king
king king
king king
Anonymous
Use google
nelsenn
Guys good evening
Osama
Anonymous
nelsenn
i wanted to know if any one could help me with this....
Please how do put a loop number(example from 1 to 10) into an array that has the size of the number of looped items
Kun-Mo
hi guys I need to reverse print a sentence I received from the user, using pointer and function and its my code: https://paste.ubuntu.com/p/ng4tkqDrbD/
can you help me fix it please?
Atropos
Kun-Mo
Roy
Any Modern C++ members
Anshul
In a video lecture, I saw that this was done.
strtok((char*)s.c_str," ")
s is a string.
Here why can I typecast a const char* returned by c_str method to char*
Anshul
Okay
Captain
Can anyone tell me how does range based for loop works with array of pointers
Suppose i have an array of pointers which has pointers pointing to integers.
for(auto a:array)
*a = 0;
All the elements will become zero.
But by default range based for loop(without reference) passes copies right.
Then how did it affect the real ones?