עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיית סינטקס קטנה ב C++ (אני צריך להגיש את זה מחר אז זה דיי דחוף)

Featured Replies

פורסם

הנה הקוד... זה ממש בסיסי ואני בטוח שהטעות ממש קטנה...

תודה מראש!

template <class Kind>

class Triangle

{

private:

Kind TzelaA;

Kind TzelaB;

Kind TzelaC;

public:

Triangle();

Triangle(Kind, Kind, Kind);

};

template <class Kind>

Triangle::Triangle(Kind tzelaA, Kind tzelaB, Kind tzelaC)

{

if ( ((tzelaA + tzelaB) > tzelaC) && ((tzelaA + tzelaC) > tzelaB) && ((tzelaC + tzelaB) > tzelaA) )

{

TzelaA = tzelaA;

TzelaB = tzelaB;

TzelaC = tzelaC;

}

else

{

cout << "Iligal Tzela valus... Defoult valus of 0 were instaled";

TzelaA = 0;

TzelaB = 0;

TzelaC = 0;

}

}

template <class Kind>

Triangle::Triangle()

{

TzelaA = 0;

TzelaB = 0;

TzelaC = 0;

}

פורסם

כשאתה ממש את הפונקציות אתה צריך לכתוב    Triangle<Kind>::Triangle ולא סתם    Triangle::Triangle

הקוד צריך להראות ככה

template <class Kind>

class Triangle

{

private:

Kind TzelaA;

Kind TzelaB;

Kind TzelaC;

public:

Triangle();

Triangle(Kind, Kind, Kind);

};

template <class Kind>

Triangle<Kind>::Triangle(Kind tzelaA, Kind tzelaB, Kind tzelaC)

{

if ( ((tzelaA + tzelaB) > tzelaC) && ((tzelaA + tzelaC) > tzelaB) && ((tzelaC + tzelaB) > tzelaA) )

{

TzelaA = tzelaA;

TzelaB = tzelaB;

TzelaC = tzelaC;

}

else

{

cout << "Iligal Tzela valus... Defoult valus of 0 were instaled";

TzelaA = 0;

TzelaB = 0;

TzelaC = 0;

}

}

template <class Kind>

Triangle<Kind>::Triangle()

{

TzelaA = 0;

TzelaB = 0;

TzelaC = 0;

}

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.