quint Posted May 19, 2003 Share Posted May 19, 2003 Hi all, found this site a while ago, and although I had no problems in Windows, the same technique yields nada in Linux. What am I over-looking now?ASCII tables Quote Link to comment Share on other sites More sharing options...
Guest ThunderRiver Posted May 19, 2003 Share Posted May 19, 2003 Mm..good question I never tried :-pI often do this #include<iostream>using namespace std;int main(){ int number = 0; for (number = 0; number <= 255; number++) { cout << number << " " << (char) number << endl; } return 0;} Compile it using G++ compiler and copy and paste character? *oops* Quote Link to comment Share on other sites More sharing options...
quint Posted May 19, 2003 Author Share Posted May 19, 2003 Mm..good question I never tried :-pI often do this#include<iostream>using namespace std;int main(){ int number = 0; for (number = 0; number <= 255; number++) { cout << number << " " << (char) number << endl; } return 0;} Compile it using G++ compiler and copy and paste character? *oops* Thanks, ThunderRiver, I'll be trying that when I find out about the "G++ compiler", and if I have it. Quote Link to comment Share on other sites More sharing options...
Guest ThunderRiver Posted May 19, 2003 Share Posted May 19, 2003 You do have it. It comes with every single distro out there except a few, like Lycoris or Lindows.Anyway, just copy the code and paste in your favorite editor like emacs and save it as some file likeasci.cppand then fire up the console, and go into the directory where the source code is located and typeg++ asci.cpp -o asciand then type./asci it should show up all the ASCII codesNonetheless, there really should be some easy way to do it. I know there is one..just dunno what it is. I never really had the need to use ASCII code anyway Quote Link to comment Share on other sites More sharing options...
quint Posted May 19, 2003 Author Share Posted May 19, 2003 You do have it. It comes with every single distro out there except a few, like Lycoris or Lindows.Anyway, just copy the code and paste in your favorite editor like emacs and save it as some file likeasci.cppand then fire up the console, and go into the directory where the source code is located and typeg++ asci.cpp -o asciand then type./asci it should show up all the ASCII codesNonetheless, there really should be some easy way to do it. I know there is one..just dunno what it is. I never really had the need to use ASCII code anywayThanks, Thunder. Will try that now. Quote Link to comment Share on other sites More sharing options...
quint Posted May 19, 2003 Author Share Posted May 19, 2003 Thunder, my son needs it for some school project (says he'll just use Windows ); started working out fine, but the last command yielded: permission denied, so I'll log-in as root a little later and try again. Tried from su, but still was denied. Thanks for giving me the right direction to start out with. Quote Link to comment Share on other sites More sharing options...
twistedcranium Posted May 21, 2003 Share Posted May 21, 2003 Thunder, my son needs it for some school project (says he'll just use Windows ); started working out fine, but the last command yielded: permission denied, so I'll log-in as root a little later and try again. Tried from su, but still was denied. Thanks for giving me the right direction to start out with. When you say last command, do you mean the "./asci " command?If so, this brings up a question about setting permissions. Do a ls -la asciand post the results here. You may need to change the execute permissions on the new 'executable' that you just compiled.chmod 755 asci Quote Link to comment Share on other sites More sharing options...
Guest ThunderRiver Posted May 21, 2003 Share Posted May 21, 2003 That's very very odd.Technically the program you compiled under your account belongs to you, so how does it end up that you can execute your own program? Quote Link to comment Share on other sites More sharing options...
twistedcranium Posted May 21, 2003 Share Posted May 21, 2003 That's very very odd.Technically the program you compiled under your account belongs to you, so how does it end up that you can execute your own program?That is what I was thinking Thunder, the 'permission denied' is puzzling. Although, maybe quint compiled it while under the suwe'll see when he gives us the output of the listing. And I didn't mean to but in on your solution, you're doing a wonderful job! Quote Link to comment Share on other sites More sharing options...
quint Posted May 21, 2003 Author Share Posted May 21, 2003 Thunder, twistedcranium,Thanks, to you both; beginning to understand little by little - (even though my son no longer needs the output) - I will pursue this, for I think it will have many other applications, in learning this OS. That is what I was thinking Thunder, the 'permission denied' is puzzling. Although, maybe quint compiled it while under the suYes, for some reason had to login as root, to apply it...maybe security set too high? (I'm guessing). Anyway, thanks to you both, and will post my results. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.