I see that you are asking should you chose C++ or Java. That really depends on the thing you want to achieve. Java is cross-platform meaning, you write code once and it works on all platforms (Windows, Linux, Mac), but most of the time application will use a lot of system resources and will be slower. If you decide to write in C++ it's a lot harder to write cross-platform code because Windows, Linux and Mac are different and a lot of things are done different, that's automatically more code and harder management, but the speed is amazing. All modern games are written in C++ because it executes blazing fast. So that really depends on what you want to achieve, if you want to write something easy and want it to work on all platforms I would go for Java or C#, on the other side if you want something that will work fast, and system resources are important, you should go for C++. Hope I cleared some things for some of you! Best Regards!
@dannyblack97057 жыл бұрын
Do u want to meka a toturials about Visual Basic ?
@PASBGR7 жыл бұрын
He could meka one, but Im sure its a simplified c++.
@NVitanovic11 жыл бұрын
1) Yes I will make more tutorials. 2) I think I will start also tutorials for C# when I finish simple C++ and those tutorials will all be about GUI and using various controls.
@X3X1T011 жыл бұрын
Great work. I watched all your tutorials to learn about C++. Please continue!
@richardjohns473411 жыл бұрын
Love all the tutorials, Can you please continue with C++ I want to get advanced in it :)
@BrandonWuPwns11 жыл бұрын
Please continue like Jose said. Great tutorials which helped me learn really basic C++. I'm a student in high school, and would like to learn C++ from you.
@jlirving9 жыл бұрын
Really nice bit of code which helped me get the logic down for my own battle ship game, THANKS
@naza.022 жыл бұрын
Thank you very much, you were the only one who knew how to explain it well 10/10
@victoriasanders229911 жыл бұрын
hi there, i tried to do exactly as you have done in the tutorial. At 16:06, I started the program, right after i entered the coordinates, it gave me an error message saying "unhandled exception at 0x000B8BC5... Access violation reading location 0x333F26A0. I'm still new to programming and i did watch all your tutorials. however, i'm not sure how to continue with this error message.
@emilianot24012 жыл бұрын
Curious, did you find the error?
@xDxDxDMinecraft11 жыл бұрын
I used another function called "void Separator()". Code: for(int l = 0; l < (clms + rows); l++){ cout
@MAtukulis8 жыл бұрын
Instead of writing void Clear(); wouldn't it be faster to write int matrix[rows][elements]={}; to set all array element to 0?
@SkiNNyPoNNy5 жыл бұрын
it would
@hooligangaming219310 жыл бұрын
Would love to be able to do this, watching this interested me so much
@ajulicek11 жыл бұрын
Thank you so much, you really helped me :)
@draperda9510 жыл бұрын
I have to make this for a project, however slightly different...The grid (arrays) need to be shown when you compile it with all 0's being shown, however, once you guess a correct co-ordinate the co-ordinate changes from a 0 to a 1.....Any ideas how i can make this work?
@umerrathore21845 жыл бұрын
Do you still have the source code of your project???
@Asterite3 жыл бұрын
@@umerrathore2184 it had been 6 years bro lol how would he still have it lying around
@umerrathore21843 жыл бұрын
@@Asterite xDD
@Asterite3 жыл бұрын
@@umerrathore2184 me: *casually replies after a year*
@XDrSinusX7 жыл бұрын
Great tutorials! Thank you for doing this.
@connoredwards1872 жыл бұрын
How do I make this so 2 players can go against eachother, choose their own ship positions and make the ships the same as the board game?
@HoudiniHarden9 жыл бұрын
is it possible to make it but with user inputs for the grid size rather than hard coding it? Vectors or Dynamic Arrays maybe? Please Help!
@super45436 жыл бұрын
i was talking about a game that shows a visual with spaceships around
@Rodarbal09 жыл бұрын
I don't get how you get this code to compile without including the stdlib ??! can't use the rand() function without it.
@salkohajric96418 жыл бұрын
Th ere are diferences betwein visual studio, code blocks and ere are diferences betwein visual studio, code blocks and dev++, probably contains of iostream lib. ++, probably contains of iostream lib, or something like that.
@xDxDxDMinecraft11 жыл бұрын
Might even be able to put that Separator() inside of Show() to make it work better, didn't do that, I'll look back.
@t109j6 жыл бұрын
I would call this game more of a minesweeper like game than a battleship game.
@darkwrath05615 жыл бұрын
i dont understand why but every time i run it and it says number of ships left it gives me some strange number like 141242. i tried to fix it but all it did was make it worse. now it only displays 0
@yihsiao_474265 жыл бұрын
same here. but i think it's supposed to be 0, since the codes didn't set any value.
@vx.nocturne4 жыл бұрын
uhh....i tested the code but it says that there's errors and the specific function is not declared
@jesuscristo81989 жыл бұрын
something doesn't work, when i run the program the screen is all black and don't show me any thing and all the cout'' '' its on red lines :/, but i'm using code blocks, how do i fix it?
@novaaaa8 жыл бұрын
Jesus Cristo im probably a bit late, but you either need to use "using namespace std" or use "std::" in front of every cout
@yosh9w3059 жыл бұрын
how to I use c++ on mac? And where can I download it (The c++ runner)?
@filip76279 жыл бұрын
yoshinaga hashimoto You should download visual studio
@kylemccarthy3379 жыл бұрын
+yoshinaga hashimoto (YoshiKoshi) Download Codeblocks for mac
@treywaka24448 жыл бұрын
Xcode. It comes with a c++ compiler
@0231-g6z8 жыл бұрын
min 11:55, Why do I get "Number of ships left is: 100". I have exactly the same code. I did everything all over and i get the same result, 100.
@0231-g6z8 жыл бұрын
Ok.... . I finished the whole thing (with out fixing the 100 ships issue). Now the game is telling me that the number of ships left is : 00FC14EC. location changes every time I run it but its displayed under the same format. Please Help!!
@thepredatorairsoft28958 жыл бұрын
this is late as fuck, i know. make sure that in your if statement has two = signs. it should be in the NumShipsLeft function.
@alexandayoung92898 жыл бұрын
yeah i keep getting 100 ships but my code is indentical to his been through video three times >
@thepredatorairsoft28958 жыл бұрын
up top when you name the constant size of MAXSHIPS, change that number to whatever you want the amount of ships to be.
@alexandayoung92898 жыл бұрын
yeah mine says 10 though and it still comes up as 100 ships so confusing
@niten71475 жыл бұрын
6 years later...
@raquibshaikh40719 жыл бұрын
hey im a beginner please tell the steps from the step selectng new project an d after i m not getting it
@stae248 жыл бұрын
Look at previous tutorials
@manaskumar254410 жыл бұрын
can we do this same game in c++ code ...?? . by selecting c++ at starting!!!! .?? plz do reply
@kajetanparzyszek67210 жыл бұрын
It's in c++ :O
@wickywix93006 жыл бұрын
that was best tutorial thank you man !!! (Y) i learned alot
@mariahguarin5115 Жыл бұрын
I tried to run your program but it keeps looping
@jasonbolton20678 жыл бұрын
Thanks for the great tutorial works fine for me I just have one question concerning the while loop. "while(1)" I wasn't sure the significance of "1" as a parameter, I tried changing it to 2000000 and the game still worked normally. Remove the number entirely though, and the build breaks, I wonder what affect the number has and why it's a required parameter when it doesn't seem to matter what the value is. Regards
@templar2738 жыл бұрын
1 , 2000 , 1 million anything you put in the while is like TRUE the condition of the loop is always true so infinite loop 0 is FALSE
@codster26932 жыл бұрын
True=1 False=0 bro
@abdullahghani26292 жыл бұрын
How to print in the grid?
@milosstojko331110 жыл бұрын
plz tell me how do i get that black gray background my head and eyes hurt from while(r u from croatia or serbia?
@grudgeswillbeheld22179 жыл бұрын
Milos Stojko I know this comment is old, but here is how you get the "Dark" background. Go to: Tools > Options. Under the "Environment" menu, click general. To the right, there will be an option that says "Color theme:" with a drop-down menu. The default option is Blue. Click it and select which one you'd like. The video uploader is using Dark.
@milosstojko33119 жыл бұрын
Ty so much
@Flowbin3 жыл бұрын
@@grudgeswillbeheld2217 I know this comment is old, but i miss nice people like you on the internet
@Asterite3 жыл бұрын
@@Flowbin they still exist on internet, trust me
@wyne00911 жыл бұрын
i also want your Sandbox microsoft visual studio. can i have it? where it can be Download? leave a comment please! :3 tnx
@puremonk21610 жыл бұрын
He named his project sandbox...
@zal97067 жыл бұрын
This isn't much a tutorial but it's an opportunity to learn. He expects you to already know the concepts and understand what he's doing. If you don't take a while to pause and actually take in the codes logic. This is more of a learn while coding thing. Not a tutorial. The experience was valuable. But I suggest you start explaining more thoroughly if you plan to call these actual tutorials
@Ikolokos7 жыл бұрын
Have you watched the other videos in his tutorial series (1 through 9)? He explains most of it there, and then applies it here.
@Pigeon3517 жыл бұрын
it's only a way for people to try a bit what he talked about in his previous videos
@wickywix93006 жыл бұрын
yess.. correct
@ROcraftable9 жыл бұрын
how did u make c++ black?
@neildevera98689 жыл бұрын
+Vlad Marius tools then options
@neildevera98689 жыл бұрын
+Vlad Marius lol
@giokvirkvelia27937 жыл бұрын
how the hell counter works?? c =0 then c++; and we got 9...
@ItsNotAllRainbows_and_Unicorns7 жыл бұрын
In C++ the counter starts at 0 as well as arrays. For example in MATLAB the counter and arrays start with 1. MATLAB is a scripting file and the funny thing it is created with C++. Anyway, for an explanation of why 0 is the starting point for programming languages, skillcrush.com/2013/01/17/why-programmers-start-counting-at-zero/int
@andymcdonald89223 жыл бұрын
As this was 4 years ago I'm sure you're not bothered about this anymore, but for anyone struggling with why the number of ships goes down when c++ is used, it is because it is actually the SetShips function that determines the amount of ships in the matrix. The NumberOfShips searches the array for live ship (ie 1's on the matrix) The function basically says that c starts at 0, then to search through the matrix and when it reaches a live ship (a 1) then to increment c. Therefore if it comes across 6 1's it will return c=6
@sirlagsalot644 жыл бұрын
Is this Java or HTML?
@nostradumb4ss2 жыл бұрын
C++
@石名誉4 жыл бұрын
Still up to date after 7 years std::cout
@swomsushi6044 жыл бұрын
use namespace lol
@shamuhammethajyyev58284 жыл бұрын
Can somebody explain please matrix[x][y]=2??? Thanks
@andymcdonald89223 жыл бұрын
I also had this problem. I'm sure you've probably moved on from this by now, but for anybody else reading this it might help. From what can I understand a "hit" battleship turns into a 2 instead of a 1 which is a live one. This stops you guessing the same square again and again and winning the game that way. This is the way i interpreted the code: if (matrix[x][y] == 1) { //if the co ordinates from user are equal to where a 1 is then you have hit a battle ship matrix[x][y] = 2; //change the hit battleship from a 1 to a 2 return true; //returns to the caller in the main function which will print out "you got me!"
@wyne00911 жыл бұрын
(y) your video shared a lots of idea :3 thank you :3 create more :3 ahhaha
@DarikAndualem10 ай бұрын
Bra pls another for c++ no part all part in one video
@UkiyoBappo Жыл бұрын
Bro music is so loud
@NishantKalra11 жыл бұрын
i wish u titled it "minesweeper" then i would not have to waste my time ._.