syntax help

This is a discussion on syntax help within the C++ Programming forums, part of the General Programming Boards category; Code: char row[3]={0,1,2}; row[0]=(board[0])&&(board[1])&&(board[2]); Will this code work to assign the first number of the array (row[0]) these three values? ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    73

    syntax help

    Code:
    char row[3]={0,1,2};
    
    row[0]=(board[0])&&(board[1])&&(board[2]);
    Will this code work to assign the first number of the array (row[0]) these three values? Visual Studio doesn't pickup on any errors or anything, but I was wondering if it worked? Thanx.

  2. #2
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    It does not make sense. You are trying to store 3 char values in the first element of an array of single chars.

  3. #3
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    ... that wont work though anyway. It looks as though you're using the && operator like the & operator. && is logical (logic denotes true/false evaluation)

  4. #4
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    Is this something like flags?

  5. #5
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: syntax help

    Originally posted by Neoground1
    Code:
    char row[3]={0,1,2};
    
    row[0]=(board[0])&&(board[1])&&(board[2]);
    Will this code work to assign the first number of the array (row[0]) these three values? Visual Studio doesn't pickup on any errors or anything, but I was wondering if it worked? Thanx.
    try to explain a little more clearly exactly what you're trying to do here; but i doubt that line of code accomplishes it.
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 09:26 AM
  2. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  3. Using VC Toolkit 2003
    By Noobwaker in forum Windows Programming
    Replies: 8
    Last Post: 03-13-2006, 07:33 AM
  4. Connecting to a mysql server and querying problem
    By Diod in forum C++ Programming
    Replies: 8
    Last Post: 02-13-2006, 10:33 AM
  5. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21