[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

ntu-kpi.comp.programming

[q]??? ? ?????? ???????? ?????? ? C++ !?!?

d.mon

3/26/2005 5:07:00 PM

OAAO
--
With best regards, >>Kozha Dmitry>>aka>>dimon
[ftp://...]>>>>>>>>>>>>>>>[ICQ: 262101181]
[mailto: dmon@viii.ntu-kpi.kiev.ua]>>>>>>>>>>>>>>
[winAmp *is not active* ]
16 Answers

WebAngel

3/26/2005 5:09:00 PM

0

> OAAO
strcat()


--
Using Opera''s revolutionary e-mail client: http://www.opera...

Vlad Babchuk

3/26/2005 5:36:00 PM

0

WebAngel wrote:
>> OAAO
>
> strcat()
?I-?AO?UE UOI AIAA?EOO OOOIEO, A ?I-?OIOUE UOI plain C
? C++ OA
s+=c;
CAA s - OOOIEA, c - OEI?II


--
WBR Vladimir Babchuk aka Chaos.
mailto:lordchaos@astral.ntu-kpi.kiev.ua
Now Playing: Nightwish - Beauty of the Beast

WebAngel

3/26/2005 5:44:00 PM

0

>> strcat()
> ?I-?AO?UE UOI AIAA?EOO OOOIEO, A ?I-?OIOUE UOI plain C

OU AOIAAUO IA CIIAAIOII! ?OI, AOIE OOOIEA OI?INAOON IAIIIO OEI?IIO? :)


--
Using Opera''s revolutionary e-mail client: http://www.opera...

Vlad Babchuk

3/26/2005 8:07:00 PM

0

WebAngel wrote:
> OU AOIAAUO IA CIIAAIOII! ?OI, AOIE OOOIEA OI?INAOON IAIIIO OEI?IIO? :)
OCO, ?IO OIIOEI OEI?II E OOOIEA - UOI IAIIICI OAUIUA OE?U AAIIUE :)

--
WBR Vladimir Babchuk aka Chaos.
mailto:lordchaos@astral.ntu-kpi.kiev.ua
Paused: Nightwish - Passion And The Opera

????? ????

3/26/2005 8:19:00 PM

0

ðÒÉ×ÅÔ ÍÏÇÕÞÉÊ Vlad Babchuk, ÚÁÓÔÁ×ÌÑÀÝÉÊ Í£ÒÔ×ÙÈ ÄÒÏÖÁÔØ!
VB> ÕÇÕ, ×ÏÔ ÔÏÌØËÏ ÓÉÍ×ÏÌ É ÓÔÒÏËÁ - ÜÔÏ ÎÅÍÎÏÇÏ ÒÁÚÎÙÅ ÔÉÐÙ ÄÁÎÎÙÈ :)
äÌÑ ËÏÇÏ ËÁË :-D


--
UnitÅd minds...
Connecting...

d.mon

3/26/2005 9:21:00 PM

0

> ?I-?AO?UE UOI AIAA?EOO OOOIEO, A ?I-?OIOUE UOI plain C
> ? C++ OA
> s+=c;
> CAA s - OOOIEA, c - OEI?II
>
>
AAIAA OAE :

char* s="";
s+=''a'';
cout<<s;

IE?ACI IA OAAIOAAO...
IA AEOAI IE?ACI IA ?U?IAEO..=(

--
With best regards, >>Kozha Dmitry>>aka>>dimon
[ftp://...]>>>>>>>>>>>>>>>[ICQ: 262101181]
[mailto: dmon@viii.ntu-kpi.kiev.ua]>>>>>>>>>>>>>>
[winAmp *is not active* ]

????? ????

3/26/2005 9:30:00 PM

0

&#240;&#210;&#201;&#215;&#197;&#212; &#205;&#207;&#199;&#213;&#222;&#201;&#202; d.mon, &#218;&#193;&#211;&#212;&#193;&#215;&#204;&#209;&#192;&#221;&#201;&#202; &#205;&#163;&#210;&#212;&#215;&#217;&#200; &#196;&#210;&#207;&#214;&#193;&#212;&#216;!

>> &#215;&#207;-&#208;&#197;&#210;&#215;&#217;&#200; &#220;&#212;&#207; &#196;&#207;&#194;&#193;&#215;&#201;&#212;&#216; &#211;&#212;&#210;&#207;&#203;&#213;, &#193; &#215;&#207;-&#215;&#212;&#207;&#210;&#217;&#200; &#220;&#212;&#207; plain C &#215; C++ &#214;&#197; s+=c;
>> &#199;&#196;&#197; s - &#211;&#212;&#210;&#207;&#203;&#193;, c - &#211;&#201;&#205;&#215;&#207;&#204;

d> &#196;&#197;&#204;&#193;&#192; &#212;&#193;&#203; :
d> char* s="";
&#245; &#212;&#197;&#194;&#209; s &#220;&#212;&#207; &#206;&#197; &#211;&#212;&#210;&#207;&#203;&#193;, &#193; &#213;&#203;&#193;&#218;&#193;&#212;&#197;&#204;&#216;, &#211;&#212;&#210;&#207;&#203;&#193; &#220;&#212;&#207; &#203;&#204;&#193;&#211;&#211; string.

--
Unit&#197;d minds...
Connecting...

Marchello

3/27/2005 9:36:00 AM

0

> char* s="";
> s+=''a'';
> cout<<s;
> &#206;&#201;&#222;&#197;&#199;&#207; &#206;&#197; &#210;&#193;&#194;&#207;&#212;&#193;&#197;&#212;...
> &#206;&#193; &#197;&#203;&#210;&#193;&#206; &#206;&#201;&#222;&#197;&#199;&#207; &#206;&#197; &#215;&#217;&#215;&#207;&#196;&#201;&#212;..=(

&#229;&#211;&#212;&#216; &#212;&#193;&#203;&#207;&#202; &#215;&#193;&#210;&#201;&#193;&#206;&#212;:
void F(char *str, char symbol)
{
str[strlen(str)] = symbol;
}

&#244;&#207;&#199;&#196;&#193;:

char *s = "1234";
cout << s << ''\n'';
F(s, ''a'');
cout << s << ''\n'';

&#242;&#197;&#218;&#213;&#204;&#216;&#212;&#193;&#212;:
1234
1234&#193;

(&#244;&#207;&#204;&#216;&#203;&#207; &#206;&#197; &#203;&#210;&#201;&#222;&#201;&#212;&#197; &#222;&#212;&#207; &#206;&#197; &#208;&#210;&#193;&#215;&#201;&#204;&#216;&#206;&#207; &#201; &#212;.&#196;.. &#252;&#212;&#193; &#198;&#201;&#199;&#206;&#209; &#211;&#210;&#193;&#194;&#207;&#212;&#193;&#204;&#193; &#206;&#193; 3
&#203;&#207;&#205;&#208;&#193;&#200;).

&#250;.&#249;. &#212;&#207;&#204;&#216;&#203;&#207; &#206;&#213;&#214;&#206;&#207; &#215;&#203;&#204;&#192;&#222;&#201;&#212;&#216; string.h &#196;&#204;&#209; strlen().

????? ????

3/27/2005 9:53:00 AM

0

&#240;&#210;&#201;&#215;&#197;&#212; &#205;&#207;&#199;&#213;&#222;&#201;&#202; Marchello, &#218;&#193;&#211;&#212;&#193;&#215;&#204;&#209;&#192;&#221;&#201;&#202; &#205;&#163;&#210;&#212;&#215;&#217;&#200; &#196;&#210;&#207;&#214;&#193;&#212;&#216;!
M> (&#244;&#207;&#204;&#216;&#203;&#207; &#206;&#197; &#203;&#210;&#201;&#222;&#201;&#212;&#197; &#222;&#212;&#207; &#206;&#197; &#208;&#210;&#193;&#215;&#201;&#204;&#216;&#206;&#207; &#201; &#212;.&#196;.. &#252;&#212;&#193; &#198;&#201;&#199;&#206;&#209; &#211;&#210;&#193;&#194;&#207;&#212;&#193;&#204;&#193; &#206;&#193; 3
M> &#203;&#207;&#205;&#208;&#193;&#200;).
(&#251;&#163;&#208;&#207;&#212;&#207;&#205;) &#238;&#197;&#208;&#210;&#193;&#215;&#201;&#204;&#216;&#206;&#207;, char *s &#220;&#212;&#207; &#203;&#207;&#206;&#211;&#212;&#193;&#206;&#212;&#193; &#201; &#211;&#207;&#207;&#212;&#215;&#197;&#212;&#211;&#212;&#215;&#197;&#206;&#206;&#207; &#213; &#205;&#197;&#206;&#209; &#211;&#210;&#193;&#218;&#213;
exception &#215;&#217;&#204;&#197;&#212;&#197;&#204;.

#include "stdafx.h"
#include <stdio.h>
#include <string>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
string ss("1234");
cout<<ss<<endl;
ss+="5";
ss+=''6'';
cout<<"add "<<ss<<endl;
int i=atoi(ss.c_str());
cout<<"char* to int "<<i;
getchar();
return 0;
}

--
Unit&#197;d minds...
Connecting...

Domanser

3/27/2005 9:56:00 AM

0

> void F(char *str, char symbol)
> {
> str[strlen(str)] = symbol;
> }

&#238;&#213; &#212;&#217; &#201; &#205;&#193;&#206;&#216;&#209;&#203;. &#247;&#211;&#197; &#211;&#212;&#193;&#206;&#196;&#193;&#210;&#212;&#206;&#217;&#197; &#198;&#213;&#206;&#203;&#195;&#201;&#201; &#210;&#193;&#194;&#207;&#212;&#193;&#192;&#212; &#211; char* &#203;&#193;&#203; &#211;
NULL-TERMINATED STRING. &#244;&#217; &#218;&#193;&#205;&#197;&#206;&#209;&#197;&#219;&#216; &#208;&#207;&#211;&#204;&#197;&#196;&#206;&#201;&#202;, &#206;&#213;&#204;&#197;&#215;&#207;&#202;, &#211;&#201;&#205;&#215;&#207;&#204; &#211;&#212;&#210;&#207;&#203;&#201; &#206;&#193;
&#211;&#215;&#207;&#202; &#211;&#201;&#205;&#215;&#207;&#204;. &#225; &#197;&#211;&#204;&#201; &#211;&#210;&#193;&#218;&#213; &#218;&#193; &#220;&#212;&#201;&#205; &#211;&#201;&#205;&#215;&#207;&#204;&#207;&#205; &#194;&#213;&#196;&#197;&#212; &#206;&#197; &#206;&#213;&#204;&#197;&#215;&#207;&#202; &#211;&#201;&#205;&#215;&#207;&#204;, &#193; &#205;&#213;&#211;&#207;&#210;?
&#225; &#197;&#211;&#204;&#201; &#196;&#210;&#213;&#199;&#193;&#209; &#211;&#212;&#210;&#207;&#203;&#193;? &#225; &#197;&#211;&#204;&#201; &#203;&#207;&#205;&#208;&#201;&#204;&#209;&#212;&#207;&#210; &#208;&#207;&#205;&#197;&#211;&#212;&#201;&#204; &#196;&#193;&#206;&#206;&#213;&#192; &#211;&#212;&#210;&#207;&#203;&#213; &#215; &#211;&#197;&#199;&#205;&#197;&#206;&#212;
&#196;&#193;&#206;&#206;&#217;&#200; READ ONLY (&#252;&#212;&#207; &#215;&#197;&#196;&#216; &#206;&#197; char s[] = "1234", &#203;&#207;&#212;&#207;&#210;&#217;&#202; &#208;&#207;&#205;&#197;&#221;&#193;&#197;&#212;&#211;&#209; &#215; &#211;&#212;&#197;&#203; &#201;
&#213;&#206;&#201;&#222;&#212;&#207;&#214;&#193;&#197;&#212;&#211;&#209; &#211;&#210;&#193;&#218;&#213; &#208;&#207;&#211;&#204;&#197; &#215;&#217;&#200;&#207;&#196;&#193; &#201;&#218; &#207;&#194;&#204;&#193;&#211;&#212;&#201; &#215;&#201;&#196;&#201;&#205;&#207;&#211;&#212;&#201;)?. &#232;&#207;&#212;&#209; &#215; &#208;&#207;&#211;&#204;&#197;&#196;&#206;&#197;&#205; &#209;
&#206;&#197; &#213;&#215;&#197;&#210;&#197;&#206;, &#208;&#207;&#208;&#210;&#193;&#215;&#216;&#212;&#197;, &#197;&#211;&#204;&#201; &#206;&#197; &#208;&#210;&#193;&#215;.

> (&#244;&#207;&#204;&#216;&#203;&#207; &#206;&#197; &#203;&#210;&#201;&#222;&#201;&#212;&#197; &#222;&#212;&#207; &#206;&#197; &#208;&#210;&#193;&#215;&#201;&#204;&#216;&#206;&#207; &#201; &#212;.&#196;.. &#252;&#212;&#193; &#198;&#201;&#199;&#206;&#209; &#211;&#210;&#193;&#194;&#207;&#212;&#193;&#204;&#193; &#206;&#193; 3
> &#203;&#207;&#205;&#208;&#193;&#200;).

&#240;&#207;&#215;&#197;&#218;&#204;&#207;.

&#241; &#194;&#217; &#196;&#197;&#204;&#193;&#204; &#212;&#193;&#203;:

char s[] = "123"; // &#208;&#207;-&#211;&#212;&#193;&#210;&#201;&#206;&#203;&#197;
strcat(s, "x"); // &#196;&#207;&#194;&#193;&#215;&#204;&#209;&#197;&#205; &#211;&#212;&#210;&#207;&#203;&#213; &#201;&#218; &#207;&#196;&#206;&#207;&#199;&#207; &#211;&#201;&#205;&#215;&#207;&#204;&#193;

&#233;&#204;&#201; &#212;&#193;&#203;:

#include <string>
std::string s1 = "123"; // &#203;&#204;&#193;&#211;&#211; &#201;&#218; &#194;&#201;&#194;&#204;&#201;&#207;&#212;&#197;&#203;&#201; STL
s1 += ''x''; // &#196;&#207;&#194;&#193;&#215;&#204;&#209;&#197;&#205; &#211;&#201;&#205;&#215;&#207;&#204;
s1 += "x"; // &#201;&#204;&#201; &#196;&#207;&#194;&#193;&#215;&#204;&#209;&#197;&#205; &#211;&#212;&#210;&#207;&#203;&#213; &#201;&#218; &#207;&#196;&#206;&#207;&#199;&#207; &#211;&#201;&#205;&#215;&#207;&#204;&#193;