I must write short script which will change int to ASCII char and char to ASCII int. But i don’t know how. I wrote this short code but something is wrong. I’m programming for half-year. #include <iostream> #include <conio.h> using namespace std; int main() { int number; cout << "Int: : "; cin >> number; ..
Category : ascii
I’m quite new to C/C++, and I’m putting together a bad knuckle tattoo generator to get used to using strings and seeded random values. The programme should initialise a 9-character string to hold the final knuckle tattoo, generate 2 random sequences of 4 letters using their ASCII values, and then output this to the console. ..
I’m creating a program that reads in a text file. Each seperate line in the file represents a new string within the program; each string would be saved to the same vector. Specifically, I would save the first character of every new line to a std::vector<char*>. My goal was to: (-) read the full text ..
My desired output looks about like this: ** ** ** ** ** **** **** **** **** **** ****** ****** ****** ****** ****** ******** ******** ******** ******** ******** ********** ********** ********** ********** ********** ********** ********** ********** ********** ********** ******** ******** ******** ******** ******** ****** ****** ****** ****** ****** **** **** **** **** **** ** ** ** ..
I wanted to program a console application to remove vowels but in away that define another string and put each array that is consnant in another string but when I wanted to cout it .it hadn’t work. How should I do it?? #include <iostream> using namespace std; int main(){ string a,b; int s=0,r,t; cin>>a; int ..
I Want to make a cool ASCII art that should come whenever someone open my command prompt or Power shell as we can do in Linux terminal. Please help me out in this Question. I know how to make a batch file but don’t know to make it show every time someone opens the command ..
😊 Today I was learning c++ that I found out with this code : #include <iostream> using namespace std; int main() { int num; cin >> num; cout << char(num); return 0; } We can convert numbers to characters and I learned that we have ASCII standard 👇🏻👇🏻 http://www.asciitable.com/ And then my question is WHY ..
I need a string of only ASCII characters, I get the original string from a text file, so it could contain any character, and I want to replace those encoded characters with a space or some other char the reason why I only need ASCII is because I need to identify tokens, keywords, literals, etc, ..
How can I run this C++ code on macOS (is a simple ascii car racing game), without windows.h? Is there any "substitute"? I know that windows.h will only run on Windows operating systems, but I’m looking for a way to make this code work on macOS too. Are there libraries? Or, are there any possibilities ..
Initially, the problem I was trying to solve basically wanted to determine whether a given number was an Armstrong number or not. To do so, this was how I started (I realize this is actually not how it should be done, but it was my first thought when I started the problem). int num1{}, sum1{}; ..
Recent Comments