Thanks! It worked and now I'm happy! Thy program I shalt make shalt work and shalt work fluently. LOL, old english.
Type: Posts; User: C++Child
Thanks! It worked and now I'm happy! Thy program I shalt make shalt work and shalt work fluently. LOL, old english.
Oh, yeah?
Example program (Not the program that this is going to be used in)
int main()
{
char digit = '3';
int dgt = digit-0;
cout<<dgt<<endl<<flush;
cin.get();
Thank you jlou, I didn't know that. I usually append my strings with '\0' anyways.
Couldn't you use cout.flush() and cin.flush() before cin.get()?
What should I use to convert character variables into integer variables? I need to do this for a thing I'm making. Any help will be appreciated. :)
If you include the header file <string>, you can make a string using the variable type std::string; and if you include the header file <cstring>, you can find the length of a string using the...
I learned C++ from a similar language used online, Javascript. (No comments from the people that think JS is a whole different thing.) I personally prefer C++ over the low-level for the beginners AND...
Correct Thantos. After all your tags that dont have a closing tag, you need to put a / before the closing >.
I'll comment that code out for you better:
#include<iostream.h>
#include<string>
#include<fstream.h>
int main()
{
std::string filename; //uses <string>
getline(cin, filename); //input...
I don't think you can change the images resolution because I have been told that you can't even OPEN images in C++. Someone might suggest ios::bin, F-I/O but I think this would have to be done in...
if(m[0]==n[0]&&m[1]==n[1]&&m[2]==n[2]) //stupid code!
There's an easier way to compare strings in cstring. Use strcmp(). strcmp() returns a value of false (0) if both strings are the same. so say...
#include<iostream>
int main()
{
char suit[4]={3,4,5,6};
std::cout<<suit[0]<<std::endl;
std::cout<<suit[1]<<std::endl;
std::cout<<suit[2]<<std::endl;
std::cout<<suit[3]<<std::endl;
return 0;
}
No its a 3 bit. 0 - 1 - 10 - 11. 11==3.
how about create an array of chicken instances.
I am making a simple typecast program that converts an integer (not the variable type) into a string but typecasted. The integer is too big to store in an int or long or double. Is there any way to...
I use Dev-4 so I don't get depricated header errors. I don't understand when to put std:: or when to put using std::. When do you, I mean, you have to put it unexpectedly in std::string and you...
You forgot the ! (NOT) operator. It is usually used to make a boolean value the opposite of what it actually is for a conditional. the .* and ->* are just saying -> then "value pointed by" or . and "...
I don't have the skill to learn APIs and I know binary file i/o. I think it's simple, but; whatever!
I think Borland includes more header files and I'm used to the command line so I use Borland's BCC 5.5. I think the installation procedure is easy because I'm a computer addict. ;) Dev-C++, at least...
You can use ios::bin or ios::binary in fstream but you would have to know the format of excel
It worked! Stupid me on that structure I didn't put a semicolon.
I create a linked lists and get three errors:
Error E2176 C:\linkedlist.cpp 10: Too many types in declaration
Error E2111 C:\linkedlist.cpp 11: Type 'linkedlist' may not be defined here
Error...
>>>>>>>>>>Hmm what a good idea for a project: A compiler that will audiobly berate you for errors and warnings. Something in a sarcastic brithish tone
Hmmm, I like that idea, "You included...
You said that wasn't a function at all! You said >>Did you mean feof()?
Yea, you have to put both the statements in the same set of parentheses.