Author Topic: i need help for c++  (Read 5047 times)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #15 on: March 31, 2015, 19:14 »
sta radi :D

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #16 on: March 31, 2015, 19:23 »
#include <iostream>
using namespace std;
void fun1(){cout << "Hello" << endl;}          // stampa hello
int fun2(int a){return a*a;}                         // kvadrira
int fun3(int &a){return a-2;}                       // oduzima 2 od vrijednosti proslijedjenoj po referenci
int Saberi(int a,int b){return a+b;}                // sabira 2 integera
double Saberi(double a,double b){return a+b;}           // sabira 2 doubla, preklopljena fja sa ovom iznad

int main()
{
fun1();

cout<< fun2(5) << endl;

int b=5;

cout << fun3(b)<< endl;

cout << Saberi(5,6) << "   " << Saberi(4.3,5.1) << endl;
}

Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #17 on: March 31, 2015, 19:25 »
to ti je programa koja djete od 5 godina moze napisat xD

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #18 on: March 31, 2015, 19:25 »
to ti je programa koja djete od 5 godina moze napisat xD

pa i ovi tvoji su isti takvi manje vise :D

reci sta ti treba tacno, otkud znam sta oces xD
Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #19 on: March 31, 2015, 19:26 »
brate eo ti jos primere ili daj mi face tamo cemo se bolje razumeti ..

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #20 on: March 31, 2015, 19:28 »
Napisi tacno sta ti treba, kakav program, pa cu napraviti, ovako ni sam ne znas sta oces xD


aaaaaaaaand again no english, I guess you'll have to delete all this posts soon :D
Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #21 on: March 31, 2015, 19:31 »
jas znam sta hocu nego me ti ne razumes ... daj mi u box face tamo cemo se bolje razumeti od ovuda nema koristi :D

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #22 on: March 31, 2015, 19:34 »
nope

Kad smislis sta ti treba napisi ovdje fino
Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #23 on: March 31, 2015, 19:37 »
treba mi programa :D kao sto sam reko sa argumenta i bez i programa da nije bash jednostvna.2 treba mi programa sa vise funkcija unutra isto tako da nije bash jednostavna. i 3 treba mi programa koja sadrzi povik na po referenca isto tako da nije bash jednostavna. i jedna od ovih programa da sadrzi objects !!! eo ti

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #24 on: March 31, 2015, 19:44 »
Class type objects? Ok, I'll make those 3 crappy programs soon
Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline Lagi

  • "Unnecessary manager of irregular transactions"
  • Honored member
  • MonsterKill Member
  • *
  • Posts: 2539
  • Country: hu
  • Karma: +226/-135
  • Awards Winner of 1 Signature of the Week Contest [COMMON] Winner of 5 Photoshop Challenge Contests [EPIC] Hacks staff member [RARE] Forum staff member [RARE] 1st place on GFX Ladder 2015 [UNIQUE] Mirana Wars Winner [RARE] Junior Tournament Member [RARE] Violinist - Music Quiz #1 [EPIC] Drummer - Music Quiz #2 [RARE] Trumpeter- Music Quiz #3 [COMMON] 2nd Place of GFX Special Event #1 [UNIQUE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #25 on: March 31, 2015, 19:46 »
!moved to right section. Good luck
I know what I stand for;
I STAND FOR ME!!!

Þetta er það lengsta sem ég fer.
Aldrei aftur samur maður er.
Ljóta leiðin heillar nú á ný,
daginn sem ég lífið aftur flý.



Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #26 on: March 31, 2015, 19:52 »
1 of the program must  have object another don't must :D

Offline NiGhT^^StAlKeR

  • Safelist Administator
  • MonsterKill Member
  • *
  • Posts: 4705
  • Country: mon
  • Karma: +266/-247
  • Geh.TT. / Rockasaurus / Nox.Interfector
  • Awards Winner of 1 Photoshop Challenge Contest [COMMON] Warlock Tour Winner [RARE] Rubick Tournament Winner Morphling Tour Winner Award [RARE] Mirana 1v1 Tournament Winner [RARE] Invoker 1v1 Tournament Winner [RARE] Admiral Tournament Winner [RARE] 1v1 Windrunner Tour Winner [RARE] 1v1 Earthshaker Tournament Winner [RARE] LA Ladder #11-25 [EPIC] Shadow Raze Tour Award [RARE] Path of the King Tour 1. Place Award [LEGENDARY] 3v3 SHOM Tournament Winner [RARE] 2v2 SHOM Tournament Winner [RARE] 1v1 AR Tour Winner [RARE] IHRL Member [RARE] IHRL Champion [EPIC] IHRL Legend [LEGENDARY] 5v5 Night Cup Winner [EPIC] Tiny Tournament Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #27 on: March 31, 2015, 20:15 »
Quote
#include <iostream>

using namespace std;


void printArrayBackwards(int q[]){

for(int i=4;i>=0;i--)
    cout << q[ i ] << " ";

}

int main()
{


int q[5],a;

cout << "Unesi niz" << endl;
for(int i=0;i<5;i++){
cin >> a;
q[ i ] =a;
}
printArrayBackwards(q);


}

Quote
#include <iostream>

using namespace std;

class kompleks{

private: double Re,Im;

public:

    kompleks(int a,int b):Re(a),Im(b){};
    kompleks(){};
    kompleks Saberi(kompleks A);
    int getRe(){return Re;}
      int getIm(){return Im;}
};

kompleks kompleks::Saberi(kompleks A){
kompleks Temp(0,0);
Temp.Re=Re+A.Re;
Temp.Im=Im+A.Im;
return Temp;

}

int main()
{

kompleks A(5,6);
kompleks B(1,7);
kompleks C=A.Saberi(B);

cout << C.getRe() << " + i" << C.getIm() << endl;
}

Quote
#include <iostream>
#include <math.h>
using namespace std;

void Square(int &a){a=pow(a,2);}
void Square(double &a){a=pow(a,2);}

int main()
{

int a;
double b;

cout << "Unesi a i b" << endl;
cin >> a;
cin >> b;

Square(a);
Square(b);

cout << a << endl;

cout << b << endl;

}

Ako ti je nesto jednostavno, ili pretesko, jbg , snadji se sam, dosta od mene :)
« Last Edit: March 31, 2015, 20:23 by NiGhT^^StAlKeR »
Dota - Pick me 0:51  SF :)
Dota - Symphony of skills 4:23 SF :D
Dota - Light the torch 2:12  SF :D
Dota - Keep ownage 0:25-1:25 Naix :D
WoDotA 8)

Offline uCANseeMe

  • Pro Member
  • *
  • Topic Author
  • Posts: 315
  • Karma: +5/-28
    • View Profile
    • Awards
Re: i need help for c++
« Reply #28 on: March 31, 2015, 20:44 »
sto ova zadnja kad onesem 3 i 5 kaze 9 i 24 :D treba 9 i 25 ? :D

Offline cacomonster

  • Pro Member
  • *
  • Posts: 477
  • Country: 00
  • Karma: +32/-21
  • Awards Warlock Tour Winner [RARE] Shadow Raze Tour Award [RARE] Pudge Wars Tournament Winner [RARE] Mirana Wars Winner [RARE] 3v3 SHOM Tournament Winner [RARE] Castle Fight Winner [RARE]
    • View Profile
    • Awards
Re: i need help for c++
« Reply #29 on: March 31, 2015, 21:29 »
Any Reason for using initializer lists in the constructor ?