Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

-= Having Difficulties in C++ and Java? Be a Part of This Thread =-

Re: -= Having Difficulty in C++? Be a Part of This Thread =-

nahihirapan po ako i convert to sa c++ itong php code na to:

ex:
Code:
<?php
for ($i = 'a'; $i != 'ako'; $i++)

{
echo "$i\n";
}

?>

ask ko lang po kung paano to sa C++ yun.. in advance!

Output:
a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz ea eb ec ed ee ef eg eh ei ej ek el em en eo ep eq er es et eu ev ew ex ey ez fa fb fc fd fe ff fg fh fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs gt gu gv gw gx gy gz ha hb hc hd he hf hg hh hi hj hk hl hm hn ho hp hq hr hs ht hu hv hw hx hy hz ia ib ic id ie if ig ih ii ij ik il im in io ip iq ir is it iu iv iw ix iy iz ja jb jc jd je jf jg jh ji jj jk jl jm jn jo jp jq jr js jt ju jv jw jx jy jz ka kb kc kd ke kf kg kh ki kj kk kl km kn ko kp kq kr ks kt ku kv kw kx ky kz la lb lc ld le lf lg lh li lj lk ll lm ln lo lp lq lr ls lt lu lv lw lx ly lz ma mb mc md me mf mg mh mi mj mk ml mm mn mo mp mq mr ms mt mu mv mw mx my mz na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy oz pa pb pc pd pe pf pg ph pi pj pk pl pm pn po pp pq pr ps pt pu pv pw px py pz qa qb qc qd qe qf qg qh qi qj qk ql qm qn qo qp qq qr qs qt qu qv qw qx qy qz ra rb rc rd re rf rg rh ri rj rk rl rm rn ro rp rq rr rs rt ru rv rw rx ry rz sa sb sc sd se sf sg sh si sj sk sl sm sn so sp sq sr ss st su sv sw sx sy sz ta tb tc td te tf tg th ti tj tk tl tm tn to tp tq tr ts tt tu tv tw tx ty tz ua ub uc ud ue uf ug uh ui uj uk ul um un uo up uq ur us ut uu uv uw ux uy uz va vb vc vd ve vf vg vh vi vj vk vl vm vn vo vp vq vr vs vt vu vv vw vx vy vz wa wb wc wd we wf wg wh wi wj wk wl wm wn wo wp wq wr ws wt wu wv ww wx wy wz xa xb xc xd xe xf xg xh xi xj xk xl xm xn xo xp xq xr xs xt xu xv xw xx xy xz ya yb yc yd ye yf yg yh yi yj yk yl ym yn yo yp yq yr ys yt yu yv yw yx yy yz za zb zc zd ze zf zg zh zi zj zk zl zm zn zo zp zq zr zs zt zu zv zw zx zy zz aaa aab aac aad aae aaf aag aah aai aaj aak aal aam aan aao aap aaq aar aas aat aau aav aaw aax aay aaz aba abb abc abd abe abf abg abh abi abj abk abl abm abn abo abp abq abr abs abt abu abv abw abx aby abz aca acb acc acd ace acf acg ach aci acj ack acl acm acn aco acp acq acr acs act acu acv acw acx acy acz ada adb adc add ade adf adg adh adi adj adk adl adm adn ado adp adq adr ads adt adu adv adw adx ady adz aea aeb aec aed aee aef aeg aeh aei aej aek ael aem aen aeo aep aeq aer aes aet aeu aev aew aex aey aez afa afb afc afd afe aff afg afh afi afj afk afl afm afn afo afp afq afr afs aft afu afv afw afx afy afz aga agb agc agd age agf agg agh agi agj agk agl agm agn ago agp agq agr ags agt agu agv agw agx agy agz aha ahb ahc ahd ahe ahf ahg ahh ahi ahj ahk ahl ahm ahn aho ahp ahq ahr ahs aht ahu ahv ahw ahx ahy ahz aia aib aic aid aie aif aig aih aii aij aik ail aim ain aio aip aiq air ais ait aiu aiv aiw aix aiy aiz aja ajb ajc ajd aje ajf ajg ajh aji ajj ajk ajl ajm ajn ajo ajp ajq ajr ajs ajt aju ajv ajw ajx ajy ajz aka akb akc akd ake akf akg akh aki akj akk akl akm akn

Stolen from stackoverflow. C#.
Code:
IEnumerable<string> generate()
{
    for (char c = 'A'; c <= 'Z'; c++)
        yield return new string(c, 1);
    for (char c = 'A'; c <= 'Z'; c++)
        for (char d = 'A'; d <= 'Z'; d++)
            yield return new string( new[] { c, d } );
}
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Sir nung tinanong ko yung prof ko kung pwede daw ba kami gumamit ng framework para dun sa motion detecting webcam software, tinatanong niya kung anong framework daw yung tinutukoy ko.. Eh hindi ko naman alam :rofl:

As soon as possible, gusto ko na muna kasi gawin yung prototype version dahil kailangan na daw yun sa 23 + yung documents.

Where do I start on making my own Motion Detecting Webcam software? Thanks po ulit sa inyo.
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

kervin nasa team C++ ? master ! :praise:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

mga sir! pa help naman po kailangan ko po makuha ung out put na toh di ko po tlga makuha ung out put bago lang po ako sa C++ mga sir!! eto po!

* ********** ********** *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********

yan po tzaka eto pa po di ko po makuha sa for loops ehh tzaka di ko po maintindihan ung turo ng prof namin sa arrays!

eto pa po ung isang problem....


Number of pupils hiegts: number of students
178 1
200 3
155 4




kailangan ko lang po ng guide sir!!!! ung guide codes thx po sa mga makakatulong!!!! need ko lang po tlga paki post na lang po sa Fb ko Don Flaming or Philip John D Peñano..... desperado na po ko dami ko na pong site na pinuntahan!!!!! thx po ulit!!!!!
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

mga sir! pa help naman po kailangan ko po makuha ung out put na toh di ko po tlga makuha ung out put bago lang po ako sa C++ mga sir!! eto po!

* ********** ********** *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********

yan po tzaka eto pa po di ko po makuha sa for loops ehh tzaka di ko po maintindihan ung turo ng prof namin sa arrays!

eto pa po ung isang problem....


Number of pupils hiegts: number of students
178 1
200 3
155 4




kailangan ko lang po ng guide sir!!!! ung guide codes thx po sa mga makakatulong!!!! need ko lang po tlga paki post na lang po sa Fb ko Don Flaming or Philip John D Peñano..... desperado na po ko dami ko na pong site na pinuntahan!!!!! thx po ulit!!!!!


Sorry, but i don't do facebook... sana makita mo tong post ko :pray:

Para sa problem 1, I'm not sure if this is the best solution, but it's working. Tested under GNU C++, hindi mo naman kasi menetion yung compiler mo
Code:
#include <iostream>

using namespace std;

int main() {

	const int x = 10;

	for (int j = 1; j <= x; j++) {
		for (int k=1;k<=j;k++) {
			cout << "*";		
		}
		cout << " ";
		for (int l=x-j;l>=0;l--) {
			cout << "*";		
		}
		cout << " ";
		for (int l=x-j;l>=0;l--) {
			cout << "*";		
		}
		cout << " ";
		for (int k=1;k<=j;k++) {
			cout << "*";		
		}
		cout << endl;
	}
	return 0;
}
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

thx po!!!! sir!!! dev C po gamit ko!!!! apat na araw na po kung puyat kaka iisip na prepressure kc kami sa proff namin!!!! grabe di naman nya kc tinuro toh tapos!!!! pinapasagutan samin!!!!
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

mga sir! pa help naman po kailangan ko po makuha ung out put na toh di ko po tlga makuha ung out put bago lang po ako sa C++ mga sir!! eto po!

* ********** ********** *
** ********* ********* **
*** ******** ******** ***
**** ******* ******* ****
***** ****** ****** *****
****** ***** ***** ******
******* **** **** *******
******** *** *** ********
********* ** ** *********
********** * * **********

yan po tzaka eto pa po di ko po makuha sa for loops ehh tzaka di ko po maintindihan ung turo ng prof namin sa arrays!

eto pa po ung isang problem....


Number of pupils hiegts: number of students
178 1
200 3
155 4




kailangan ko lang po ng guide sir!!!! ung guide codes thx po sa mga makakatulong!!!! need ko lang po tlga paki post na lang po sa Fb ko Don Flaming or Philip John D Peñano..... desperado na po ko dami ko na pong site na pinuntahan!!!!! thx po ulit!!!!!


anong gagawin sa problem 2? :noidea::noidea:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Sir nung tinanong ko yung prof ko kung pwede daw ba kami gumamit ng framework para dun sa motion detecting webcam software, tinatanong niya kung anong framework daw yung tinutukoy ko.. Eh hindi ko naman alam :rofl:

As soon as possible, gusto ko na muna kasi gawin yung prototype version dahil kailangan na daw yun sa 23 + yung documents.

Where do I start on making my own Motion Detecting Webcam software? Thanks po ulit sa inyo.

Pre-requisites: (Note: Other IDEs are also known to work with OpenCV)
Visual C++ 2010 Express
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

Microsoft Windows SDK
http://msdn.microsoft.com/en-US/windows//bb980924.aspx?wt.svl=more_downloads

A camera that is supported and working under Windows.

Install and compile OpenCV binaries and libraries:
http://opencv.willowgarage.com/wiki/InstallGuide/

Create a simple project (You'll need to right click your project name in Solution Explorer then Properties->Configuration Properties->Linker->General->Additional Library Directories->Edit. Find the location folder of the libraries created when you installed OpenCV then add that folder. Then, Solution Explorer->Properties->Configuration Properties->C/C++->General->Additional Include Directories->Edit. Find the OpenCV include directory. Click OK OK)
http://opencv.willowgarage.com/wiki/CameraCapture

Compile and Run. If no errors appeared on Visual Studio's output window you're good for the next level-- which designing your project.

Come back when you finished the steps above.

Edit: Download and read this OpenCV e-book. More specifically, pages 265 (Background Subtraction), 270 (Frame Differencing) and the first half of Chapter 9. Andyan yung kelangan mong functions to distinguish changes between frames.
http://minus.com/mSPTQKksA/
 
Last edited:
Re: -= Having Difficulty in C++? Be a Part of This Thread =-


anong gagawin sa problem 2? :noidea::noidea:

oo nga po..tama ka sir diaven....

hmm..anyway,.pakidetail po ng kung ano ang gagawin sa problem 2..
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

sir!!! ung problem two po!!!!! arrays po toh alam ko!!! nag cocompute ng statistic ganito po ung out put nya!!!!!!





Height of pupils: Number of Pupils:
123 2
155 1
155 3
...........

AVERAGE:


gnayn po!!!! di ko lang po alam kung panu gamitin ung arrays!!! na may kasamang For Loops!!! mejo di ko po makita ung algorithym masakit sa ulo!!!!




thx uli pala mga sir!!!!!!
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

sir!!! ung problem two po!!!!! arrays po toh alam ko!!! nag cocompute ng statistic ganito po ung out put nya!!!!!!





Height of pupils: Number of Pupils:
123 2
155 1
155 3
...........

AVERAGE:


gnayn po!!!! di ko lang po alam kung panu gamitin ung arrays!!! na may kasamang For Loops!!! mejo di ko po makita ung algorithym masakit sa ulo!!!!




thx uli pala mga sir!!!!!!


walang limit yung input ng user?
tsaka yung range nung height?

 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

Pre-requisites: (Note: Other IDEs are also known to work with OpenCV)
Visual C++ 2010 Express
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

Microsoft Windows SDK
http://msdn.microsoft.com/en-US/windows//bb980924.aspx?wt.svl=more_downloads

A camera that is supported and working under Windows.

Install and compile OpenCV binaries and libraries:
http://opencv.willowgarage.com/wiki/InstallGuide/

Create a simple project (You'll need to right click your project name in Solution Explorer then Properties->Configuration Properties->Linker->General->Additional Library Directories->Edit. Find the location folder of the libraries created when you installed OpenCV then add that folder. Then, Solution Explorer->Properties->Configuration Properties->C/C++->General->Additional Include Directories->Edit. Find the OpenCV include directory. Click OK OK)
http://opencv.willowgarage.com/wiki/CameraCapture

Compile and Run. If no errors appeared on Visual Studio's output window you're good for the next level-- which designing your project.

Come back when you finished the steps above.

Edit: Download and read this OpenCV e-book. More specifically, pages 265 (Background Subtraction), 270 (Frame Differencing) and the first half of Chapter 9. Andyan yung kelangan mong functions to distinguish changes between frames.
http://minus.com/mSPTQKksA/

ang dami! :slap: pero try ko intindihin sir. Update ko po kayo. Salamat :salute:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

help !!,, output in c++...

NAME:
AGE:
ADDRESS:
STATUS:
SEX:

Pag getline ko sa full name at address, hindi gumana.. Dumeritso siya sa address: status:
Bat ganun..
 
Last edited:
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

ito ung ginawa ko..

#include <iostream.h>
int main ()
{
char name[20];
char age[10];
char add[30];
char status[10];
char sex[10];
cout <<"NAME: ";
cin.getline(name,20);
cout <<"AGE: ";
cin >>age;
cout <<"ADDRESS: ";
cin.getline(add,30);
cout <<"STATUS: ";
cin >>status;
cout <<"SEX: ";
cin >>sex;

Then ung output ko blah blah...
Anu ang mali dyan mga pipz?
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

ito ung ginawa ko..

#include <iostream.h>
int main ()
{
char name[20];
char age[10];
char add[30];
char status[10];
char sex[10];
cout <<"NAME: ";
cin.getline(name,20);
cout <<"AGE: ";
cin >>age;
cout <<"ADDRESS: ";
cin.getline(add,30);
cout <<"STATUS: ";
cin >>status;
cout <<"SEX: ";
cin >>sex;

Then ung output ko blah blah...
Anu ang mali dyan mga pipz?

#include <iostream>
using namespace std;

int main ()
{
char name[20];
char age[10];
char add[30];
char status[10];
char sex[10];
char answer;

do
{

cout <<"NAME: ";
cin.getline(name,20);

cout <<"AGE: ";
cin.getline(age,20);

cout <<"ADDRESS: ";
cin.getline(add,30);

cout <<"STATUS: ";
cin.getline(status,20);

cout <<"SEX: ";
cin.getline(sex,20);

cout << "Do you want to continue ( Y/N ) ? : ";
cin >> answer;

} while (answer != 'N' && answer != 'n');

return 0;
}
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

#include <iostream>
using namespace std;

int main ()
{
char name[20];
char age[10];
char add[30];
char status[10];
char sex[10];
char answer;

do
{

cout <<"NAME: ";
cin.getline(name,20);

cout <<"AGE: ";
cin.getline(age,20);

cout <<"ADDRESS: ";
cin.getline(add,30);

cout <<"STATUS: ";
cin.getline(status,20);

cout <<"SEX: ";
cin.getline(sex,20);

cout << "Do you want to continue ( Y/N ) ? : ";
cin >> answer;

} while (answer != 'N' && answer != 'n');

return 0;
}


Thanks nito tol.... What if ung CHAR AGE ay palitan ng INT AGE...paanu ba?
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

kung ok lng sana guys. pa help nmn cousin ko sa C project nia. 1st year plang. di ko kc matulungan kc Java plan at VB6 alam ko..

eto daw proj nla..

C program to calculate the parking fare for customers who park their cars in a parking lot when the following information is given:
a. A character showing the type of vehicle: C for car, T for truck.
b. An integcr between 0 and 24 showing the hour the vehicle entered the lot.
c. An integer between 0 and 60 showing the minute the vehicle entered the lot.
d. An integer between 0 and 24 showing the hour the vehicle left the lot.
e. An integer between 0 and 60 showing the minute the vehicle left the lot.
This is a public lot. To encourage people to park for a short period of time, the management uses two different rates for each type of vehicle, as shown in Table
CAR $0 / hr first 3 hr $1.50 / hr after 3 hr
TRUCK $1 / hr first 2 hr $2.30 / hr after 2 hr
Input data consists of a character and a set of four integers. The character represents type of vehicle and the four integers indicate: Hour entered the lot, Minute entered lot, Hour exited lot, and Minute exited the lot.

Output should be like:

Type of vehicle:
TIME-IN HR:MN
TIME-OUT HR:MN
----------
PARKING TIME HR:MN
ROUNDED TIME HOURS

TOTAL CHARGE P_____.__

iba kc syntax sa java eh kea kung ok lng pa help nmn,.
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

kung ok lng sana guys. pa help nmn cousin ko sa C project nia. 1st year plang. di ko kc matulungan kc Java plan at VB6 alam ko..

eto daw proj nla..

C program to calculate the parking fare for customers who park their cars in a parking lot when the following information is given:
a. A character showing the type of vehicle: C for car, T for truck.
b. An integcr between 0 and 24 showing the hour the vehicle entered the lot.
c. An integer between 0 and 60 showing the minute the vehicle entered the lot.
d. An integer between 0 and 24 showing the hour the vehicle left the lot.
e. An integer between 0 and 60 showing the minute the vehicle left the lot.
This is a public lot. To encourage people to park for a short period of time, the management uses two different rates for each type of vehicle, as shown in Table
CAR $0 / hr first 3 hr $1.50 / hr after 3 hr
TRUCK $1 / hr first 2 hr $2.30 / hr after 2 hr
Input data consists of a character and a set of four integers. The character represents type of vehicle and the four integers indicate: Hour entered the lot, Minute entered lot, Hour exited lot, and Minute exited the lot.

Output should be like:

Type of vehicle:
TIME-IN HR:MN
TIME-OUT HR:MN
----------
PARKING TIME HR:MN
ROUNDED TIME HOURS

TOTAL CHARGE P_____.__

iba kc syntax sa java eh kea kung ok lng pa help nmn,.

i think this thread is not the one that you are looking for.. C++ programming Thread po ito not C programming Thread...

alam ko..programmer ka..kaya alam mo kung ano ang pinagkakaiba ng C sa C++..sample...base on their structures etc.

pero..pwede pa naman namin ayong matulungan....sa C++ code nga lang :slap:
 
Last edited:
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

sir ezroot and asaman... Where do I specifically start? Medyo hirap akong intindihin. Sorry :slap:
 
Re: -= Having Difficulty in C++? Be a Part of This Thread =-

sir ezroot and asaman... Where do I specifically start? Medyo hirap akong intindihin. Sorry :slap:

Sinundan mo ba yung process na post ko sa previous page?

Bigay ka ng info kung san di mo maintindihan dahil di ko rin alam kung anong current level mo sa software development.

Pinayagan ka na ba ng professor mo na gumamit ng OpenCV para sa project nyo?
 
Back
Top Bottom