#define's Profile User Rating: *****

Reputation: 1732 Grandmaster
Group:
Expert
Active Posts:
6,158 (2.34 per day)
Joined:
19-February 09
Profile Views:
49,826
Last Active:
User is offline Apr 28 2016 08:53 PM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
PC
Your Car:
LandRover
Dream Kudos:
0
Expert In:
C/C++

Latest Visitors

Icon   #define has not set their status

Posts I've Made

  1. In Topic: How to input a function and array in this Theme Park Tickets

    Posted 28 Apr 2016

    Hi, if you create a variable in another function with the same name as one in main (say), then they are two different variables.

    You can use a parameter to pass the value to the function.

    void availableDiscount (int DiscountCode, int TotalCost);
    
    
  2. In Topic: How to set up a hash for ints?

    Posted 28 Apr 2016

    I can envision the creation of a table and using a loop to set the values to -1. The next loop, stepping through numbers wouldn't need to be in the above loop.
  3. In Topic: Printing a pyramid from a string "abcd" etc.

    Posted 28 Apr 2016

    Hi.

    So it just prints one character - 'a'.

    Then p is 1.

    Printing the spaces looks ok.

    Printing the first half characters -> c=1 so c<=p is c<=1, so thats ok. x2 is moved to 'b'.

    Printing the second half characters, have a look.
  4. In Topic: What is wrong with my code

    Posted 28 Apr 2016

    Hi, there is a tutorial here with a program similar to yours on page 2. Have you include the System namespace? You should be able to remove items from a project, perhaps with a right-click menu.

    Getting started with Windows Forms using Visual C++ Tutorial

    There is a tutorial there for writing console programs as well.
  5. In Topic: I'm super confused on what to do

    Posted 27 Apr 2016

    Hi, you don't need all these float variables in main. You will have one variable to hold the balance (amount in the account at any one time) and another variable to hold the transaction amount.

    The function readAcc will set the balance using the bal reference parameter.

    calcBal will update the balance depending upon the transaction.

    This display function will display the transaction type and the transaction amount and the resulting balance.

My Information

Member Title:
Duke of Err
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Delta Quadrant
Years Programming:
12
Programming Languages:
C,C++,HTML,CSS

Contact Information

E-mail:
Private
Website URL:
Website URL  http://

Comments

Page 1 of 1
  1. Photo

    moonlight1020 Icon

    07 Jul 2015 - 11:15
    http://www.dreamincode.net/forums/topic/378386-problem-with-char-array/page__st__15__gopid__2167449&#entry2167449
  2. Photo

    GryphonClaws Icon

    10 Jan 2013 - 01:15
    Thanks #define. I can't believe I missed such a simple detail.
  3. Photo

    raghav.naganathan Icon

    07 Nov 2012 - 20:40
    Dude...before your reputation changes, I would like to tell you that it(729) is a perfect cube :) Cheers :)
Page 1 of 1