can we insert symbols ? ? dev c++

Pages: 12
is there any way to insert symbols in dev c++ ? i want to insert a symbol of "ROOT" so how can i do that ??
What's the symbol of ROOT? do you mean this '%'?
copy paste this: √
allrite thanks but how did u got it ?
I googled: unicode square root
wtf don't use taht symbol it's unicode. I'm almost sure you code in ascii not unicode. and how does this post get replies and my doesnt.
Well, you can't use it as an operator, but you can put it in strings, like this for example:
1
2
3
4
5
#include "math.h"
#include "stdio.h"
int main(){
        printf("√2=%f\n",sqrt(2));
}
Last edited on
ok .. but u still havent answered from where did u got the symbol ...and counteron what do u mean mine post get replies and ur doesnt ??
I just copy-pasted it from a website.
:P i found another way .. hold right alt and type 251 of the numpad .. try it the symbol come :))
ok i cant use this symbol in c++ . . . it comes up in the form of v
You can use any Unicode symbol in C++.

The problem is displaying anything not in the standard ASCII set gets tricky becaues you have to go outside the standard lib.

How you do it depends on what kind of program you're making and possibly even what OS you're targetting.

Are you making a console program? Are you on Windows?
Also, just because you can put the symbol in your text file -- it may not save correctly.

To print the square root symbol to the Windows console using the default code page, use:

1
2
3
4
5
6
7
8
#include <iostream>
using namespace std;

int main()
  {
  cout << "\xFB" << "9 = 3\n";
  return 0;
  }

Hope this helps.
Why UTF-8 isn't the default codepage in windows... I'll never know.

Seriously, wtf.
im abcd wrote:
ok .. but u still havent answered from where did u got the symbol ...and counteron what do u mean mine post get replies and ur doesnt ??
On windows xp. Start -> All Programs -> Accessories -> System Tools -> Character Map
Disch wrote:
Why UTF-8 isn't the default codepage in windows... I'll never know.
Because it didn't exist when Microsoft designed their multilanguage support... and UTF-8 isn't a code page, it is an encoding system.

That's the dichotomy between software that works, now, on multilingual systems, and a nice, pure system for multilingual support.

MS's code pages were a good answer to the existing technology problems.
Unicode and UTF require existing technology to change to match them.

You'll also notice that MS has made very significant efforts to update their technology to use the at-the-time nascant Unicode -- all their systems now natively use UTF-16. But they also need to continue to support the code page system, in which not just they, but many, many companies around the world, have heavily invested for multilingual systems support.

You can't just throw out older technology at the drop of a consortium's pen. The pecuniary costs are prohibitive.
Duoas wrote:
You can't just throw out older technology at the drop of a consortium's pen. The pecuniary costs are prohibitive.
Good point. Some people just wanna do what is now and forget the past.
closed account (3pj6b7Xj)
Disch, I always wondered that myself, its one of those half-assed jobs M$ does, they make an implementation and leave the rest some where else.
Disch, I always wondered that myself
What have you wondered? If you mean "Why UTF-8 isn't the default codepage in windows... I'll never know." I guess Duoas is right. UTF-8 isn't a code page though I'm not certain what exactly a code page is but I'm sure Duoas is right.

they make an implementation and leave the rest some where else
What do you mean here?
Pages: 12