Dima
lol
Anonymous
hello guys!
Anonymous
could somebody help with the code to program a kind of 'battleship game' ?
Anonymous
in language c
Anonymous
anyone has the battleship code?
Caio
How so?
Caio
An battleship game?
Anonymous
we even gave you source code
Anonymous
start thinking instead of asking xD
Anonymous
and that source code has a lot of comments, so just read it
Anonymous
sry vms, i was trying to take the more resources as possible :(
Anonymous
the more the better
Anonymous
hahahha not everyone has it
Anonymous
has what? google?
Anonymous
battleship game man
Mat
Anonymous
even in google there are not so much good codes
Anonymous
Anonymous
yeah but
Anonymous
i mean good ones u know
Anonymous
Anonymous
Caio
Someone knows an library kind of “vector” one, but better than it?
Anonymous
i mean good ones u know
how can you determine if it's good or not without even looking at the code? xD
Anonymous
Anonymous
Anonymous
i ain´t saying that they´re bad, but there are with other different structures that i dont feel so much comfortable, bc i haven´t used them before.
Anonymous
you're loosing time
Mat
Anonymous
Anonymous
🤨
start doing what they told you in the other group
Anonymous
make the two arrays and start from there
Anonymous
display the board, make a function to check the coords of a board, etc
Anonymous
alright
Igor🇺🇦
Artöm
Anonymous
I use the same namespace in separate cpp files(not separatint the namespace definition), then I got multiple definition of ..., why?
Anonymous
The circumstances is similar to http://www.cplusplus.com/forum/beginner/12458/
Mat
Pavel
Pavel
This should be divided into header and cpp
Header with extern, cpp with nn::i = 5;
Pavel
Or using inline if it's C++17
Anonymous
What if namepace nn{int i;}; is it correct?
Anonymous
Or just describ how to use the same namepace in multiple cpp file is ok
Anonymous
Ok, thanks
Anonymous
Yep, I think the ordinary method is to use extern to declare a external variable, instead of namespace, which might often used for funtion name.
Anonymous
I just confused if it's used for definition while there are multiple files.
Anonymous
I know how to use static and extern, though. Anyway, thanks for the advices.
Ashur
Hello
Ashur
Okay🙃
klimi
ex4_mp1e
Hi
klimi
ex4_mp1e
Hi?
How about your programming knowledge..?
klimi
klimi
What do you mean
francis
hello. what is function recursion?
Artöm
Muamall
hey guys i want web site or a book just for c examples
klimi
Artöm
Ass we can
Dima
what do you need
Dima
what?
Dima
learn language basics
🐉
https://hastebin.com/penuxoguke.css
What does happen to that things(0) ?
Artöm
Zero init
Igor🇺🇦
Ludovic 'Archivist'
It looks like homework to me
Ludovic 'Archivist'
basically the *things will point to nothing, correct?
It is most of the time the same as 0. nullptr is an alias for an invalid pointer. Most systems use 0 as it is cheap to compare against 0. It is in theory possible to have other values for nullptr, another possible value is std::numeric_limits<intptr_t>::max()
Ludovic 'Archivist'
In C++, using nullptr is always preferred as it is more readable
Ludovic 'Archivist'
In C, it is advised to use the macro NULL
🐉
More like I hope there are no problems when doing something like Bar *array = new Bar [10];
🐉
Because in this case the default constructor would be called, am I correct?