Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] tidak ada error tetapi function tidak papar
21-09-2013, 04:43 AM, (This post was last modified: 21-09-2013, 10:36 AM by hard3.)
Post: #1
[SOLVED] tidak ada error tetapi function tidak papar
Hello tbd member,sape2 boleh bantu.kenapa function tidak display.Error xde.

Code:
#include <iostream>

using namespace std;

void weaponSword();
void discRare();

int main()
{
    int ironSword[3];
    int blackaxe;

    void weaponSword();

    for(int addDamage = 1; addDamage < 3; addDamage +=1)
    {
        ironSword[addDamage] = 5;

        cout << addDamage << " IronSword" << " Damage " << ironSword[addDamage] << endl;

    }

    void discRare();

    blackaxe = 10;
    cout << "3 " << "BlackSword " << "Damage " << blackaxe << endl;

    return 0;
}


void weaponSword()
{
    cout << "Welcome to Weapon Shop" << endl;
    cout << "Category:NORMAL" << endl;

    return;
}

void discRare()
{
    cout << "Category:RARE" << endl;

    return;
}
A word of advice,
don't promise only when u are HAPPY,
don't reply when u are ANGRY,
and don't decide when u are SAD.
Reply
21-09-2013, 09:22 AM,
Post: #2
RE: tidak ada error tetapi function tidak papar
[SOLVE]huh,rupanya terletak void masa call function.
A word of advice,
don't promise only when u are HAPPY,
don't reply when u are ANGRY,
and don't decide when u are SAD.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  call function diamond troy 3 356 27-10-2013, 09:07 PM
Last Post: pers0nant
  [ASK]Function [SOLVED] - Credit to Rempah Xantium 5 555 20-05-2013, 09:00 PM
Last Post: Xantium
  Assalamualaikum Dan Salam Sejahtera ( .C ) [Solved] Xantium 6 566 29-04-2013, 07:01 AM
Last Post: Xantium
  cout Largest Number entered. - SOLVED maggotz 5 491 11-04-2013, 12:50 AM
Last Post: maggotz
  Having 2 friends function in a class muhammadjaziem 2 330 20-03-2013, 01:45 AM
Last Post: Cybercrookz
  [help]tolong delete function rosak T.T Timon 0 486 31-05-2012, 03:10 AM
Last Post: Timon
  [help] nak wat approve dengan disapprove function SMAS Timon 3 941 23-05-2012, 06:40 PM
Last Post: Timon
  [Solved] Loop dalam switch structure. ibnumalik 10 3,208 05-04-2012, 10:21 AM
Last Post: ibnumalik
  [help]c++ function execute if else statement output pron3t 10 1,109 16-03-2012, 12:34 PM
Last Post: pron3t
  [ask]weak about function pron3t 6 936 11-02-2012, 03:20 AM
Last Post: otai_g

Forum Jump: