Post: C++ help needed
03-22-2011, 12:35 PM #1
Mr Hankey
◕‿◕
(adsbygoogle = window.adsbygoogle || []).push({}); As you may have seen in my last few threads.. I´m a starting scripter
and I saw something and I was wondering

how do i make:
You must login or register to view this content.

With ascii codes..
You must login or register to view this content.

Marked with red (look nicest)

I want to open it in CMD... and it should look nice

Can anyone make this for me?
Will thank and donate 100-150k vbux =)

Thx
(adsbygoogle = window.adsbygoogle || []).push({});
03-22-2011, 01:29 PM #2
Originally posted by pieter1994 View Post
As you may have seen in my last few threads.. I´m a starting scripter
and I saw something and I was wondering

how do i make:
You must login or register to view this content.

With ascii codes..
You must login or register to view this content.

Marked with red (look nicest)

I want to open it in CMD... and it should look nice

Can anyone make this for me?
Will thank and donate 100-150k vbux =)

Thx




cout<<"Ascii value 200: "<<char(200);
cout<<"Ascii value 200: "<<(char)200;

Its typecasting.

The following user thanked TheUberFail for this useful post:

Mr Hankey
03-22-2011, 02:17 PM #3
Mr Hankey
◕‿◕
Originally posted by TheUberFail View Post
cout<<"Ascii value 200: "<<char(200);
cout<<"Ascii value 200: "<<(char)200;

Its typecasting.


That's like exactly what I saw before ! thx! but can u explain some more? cause it was with ehm... like: If else & if etc
03-22-2011, 11:14 PM #4
Originally posted by pieter1994 View Post
That's like exactly what I saw before ! thx! but can u explain some more? cause it was with ehm... like: If else & if etc


Well, ascii values are integers, but the character it self is a char data type, so you need to cast the type of char, onto the integer (ascii code)

type casting:

const char letter_A = 'A';

cout<<int(letter_A);

//we type cast the character to integer so it displays the integer not the character.

//output: 65

//This works other way round

cout<<char(65);

//output: A
03-23-2011, 01:55 AM #5
kiwimoosical
Bounty hunter
There are multiple types of casts as well as what TheUb3rFail showed you.

Regular cast: (typeName)data;
Function cast: typeName(data);
Static cast: static_cast<typeName>(data);
Dynamic cast: dynamic_cast<typeName>(data*);
Const cast: const_cast<typeName>(data);
Reinterpret cast: reinterpret_cast<typeName>(data);

All of which have similar uses but some are better than others based on the situation. But casting is basically converting from one type or state to another.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo