Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / April 2008

Tip: Looking for answers? Try searching our database.

integer to string

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boki - 07 Apr 2008 09:36 GMT
Hi All,

I think it should be very easy, but I am new to c++.net ( original is
c# / vb )

I need something like:

.ToString()

or

val( string_B )

another question, in c# it is clear to enter code after double click
the compnents, how about C++ ? is that the same ? because I saw IDE
shows .h file... not a .c file after double click a component ( ex:
text box )

Thanks.

/*************** CODE BEGIN **********/
private: System::Void button1_Click(System::Object^  sender,
System::EventArgs^  e) {

  CultureInfo^ myCI = gcnew CultureInfo( "en-US" );
  Calendar^ myCal = myCI->Calendar;

  // Gets the DTFI properties required by GetWeekOfYear.
  CalendarWeekRule myCWR = myCI->DateTimeFormat->CalendarWeekRule;
  DayOfWeek myFirstDOW = myCI->DateTimeFormat->FirstDayOfWeek;

this->textBox1->Text = myCal->GetWeekOfYear( DateTime::Now, myCWR,
myFirstDOW ) ;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

};
/************* CODE END ************/

Best regards,
Boki.
David Lowndes - 07 Apr 2008 11:11 GMT
>I think it should be very easy, but I am new to c++.net ( original is
>c# / vb )
>
>I need something like:
>
>.ToString()

If you're using C++/CLI and managed objects, you still have
ToString().

For native C/C++ code, you can use _itoa()

>or
>val( string_B )

atoi()

>another question, in c# it is clear to enter code after double click
>the compnents, how about C++ ? is that the same ? because I saw IDE
>shows .h file... not a .c file after double click a component ( ex:
>text box )

I suspect what you're describing here is one of the not so nice things
about C++/CLI in that the designer puts code in the header file rather
than the source file - apparently it's due to the fact that it was
designed for C# use!

Dave
Boki - 07 Apr 2008 12:12 GMT
> >I think it should be very easy, but I am new to c++.net ( original is
> >c# / vb )
[quoted text clipped - 24 lines]
>
> Dave

Thanks, I saw the .ToString() now.
C# use, got it.

by the way, I can't find out the execution file after build it...., I
didn't see the "Release" folder and there is no .exe file in debug
folder.

Boki.
David Lowndes - 07 Apr 2008 13:18 GMT
>by the way, I can't find out the execution file after build it...., I
>didn't see the "Release" folder and there is no .exe file in debug
>folder.

Has it built successfully? Where does the build log indicate it's put
it?

Dave
Ben Voigt [C++ MVP] - 07 Apr 2008 16:40 GMT
>>> I think it should be very easy, but I am new to c++.net ( original
>>> is c# / vb )
[quoted text clipped - 31 lines]
> didn't see the "Release" folder and there is no .exe file in debug
> folder.

Look in <solution root>\debug instead of <project root>\bin\release

> Boki.
Boki - 08 Apr 2008 03:14 GMT
> > by the way, I can't find out the execution file after build it...., I
> > didn't see the "Release" folder and there is no .exe file in debug
> > folder.
>
> Look in <solution root>\debug instead of <project root>\bin\release

I found that, I didn't change "Debug" to "Release"

It looks if I build in "Debug", there will be no .exe file.

thanks.

Boki.
Ben Voigt [C++ MVP] - 08 Apr 2008 14:54 GMT
>>> by the way, I can't find out the execution file after build it....,
>>> I didn't see the "Release" folder and there is no .exe file in debug
[quoted text clipped - 5 lines]
>
> It looks if I build in "Debug", there will be no .exe file.

No, the *directory* is in a different location from where the C# compiler
puts things.  Sorry about conflating debug and release.  Here is a more
accurate instruction:

Look in <solution root>\debug instead of <project root>\bin\debug
Look in <solution root>\release instead of <project root>\bin\release

> thanks.
>
> Boki.
Boki - 09 Apr 2008 03:24 GMT
> Look in <solution root>\debug instead of <project root>\bin\debug
> Look in <solution root>\release instead of <project root>\bin\release

Thanks.

Boki.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.