473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Im a noob!!

Im a complete noob and im proud of it. I am excited in learning everything about the C++ language. Right now im trying to make tic-tac-toe. Go ahead laugh.
here is what i have so far

#include<iostream>
#include<stdlib.h>
using namespace std;

int main()
{int h,h2,tmp;
h=10;
h2=10;
cout<<"\n\n\n";
for (tmp=0;tmp!=h;tmp++) cout<<" |\n";
for (tmp=0;tmp!=h2;tmp++)cout<<" |\n";

cout<< "\n\n"; return 0;

}

that just makes to lines,but one starts at the bottom of the other. How would I make the second also start at the top. Alright get your last laughs out and please help a complete noob. Thanks for your help.
Sep 7 '06 #1
2 2806
Someone help this guy out. Not to steal your idea, but being even more of a noob myself, i would like to try to understand this too.
Sep 7 '06 #2
risby
30
Right now im trying to make tic-tac-toe.

How would I make the second also start at the top.
You can draw two vertical lines like this:
Expand|Select|Wrap|Line Numbers
  1. #include<iostream>
  2. #include<stdlib.h>
  3. using namespace std;
  4. int main()
  5. {
  6. int h, tmp;
  7.  
  8. h=10;
  9. cout<<"\n\n\n";
  10. for (tmp=0;tmp!=h;tmp++)
  11. {
  12. cout<<" | |\n";
  13. }
  14. cout<< "\n\n";
  15. return 0;
  16. }
  17.  
but that ain't gonna help much. You need to draw two horizontal line too. What are you gonna do? What character will you use for the intersection of these vertical and horizontal lines. You need to move the cursor (where the next character goes) back up the file or screen. You are also going to have to position the cursor to place the O's and X's.

These are features of a graphics package rather than text file output.
Sep 7 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Dave Williams | last post by:
First off...total noob to VB. So far have learned a lot in 1.5 days and feel fairly comfortable at throwing screens up. However, I want to start writing forms that revolve around an access...
7
by: administrata | last post by:
Is it possible? I tried... I = "John" print \ """ I used to love pizza"""
10
by: Matt Hollingsworth | last post by:
Hello, Very new to python, so a noob question. When I've written stuff in JavaScript or MEL in the past, I've always adopted the variable naming convention of using a $ as the first character...
1
by: davestrike | last post by:
I am a noob to sql and asp programming. I am working on a db for the gaming squad I am a member of. One of the pages I created is a roster list of all the squad members. Part of this roster is...
3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: Rtritell | last post by:
I dont get whats wrong with this <html> <head> <title>Random Mad Lib!</title> <script language="JavaScript"> <!-- Hide
8
by: Ivan Shevanski | last post by:
Alright heres another noob question for everyone. Alright, say I have a menu like this. print "1. . .Start" print "2. . .End" choice1 = raw_input("> ") and then I had this to determine what...
5
by: Hydrogenfussion | last post by:
Hello and thank you for reading this. I have just started to learn C++ from www.cprogramming.com,its a great site! But i do not understand some of the terms. I am using Dev-C++. Can you tell me...
1
by: Fluffy654 | last post by:
First off I am a complete noob when it comes to doing anything with servers. I'm just beginning to learn today because I need to start adding SSI to my websites. I apologise in advance if I am making...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.