Using Exclamation Marks '!' in C?

I have come across a problem involving exclamation marks and integers whilst reading a code in my reference book. L...

Convert all strings in a list to int?

In Python, I want to convert all strings in a list to integers. So if I have: results = ['1', '2', '3'] How do I...

C++ concatenate two int arrays into one larger array?

Is there a way to take two int arrays in C++ int * arr1; int * arr2; //pretend that in the lines below, we fill the...

Convert String to Integer in XSLT 1.0?

I want to convert a string value in xslt to an integer value. I am using xslt 1.0, so i can't use those functions su...

Using Exclamation Marks '!' in C?

I have come across a problem involving exclamation marks and integers whilst reading a code in my reference book. L...

How to elegantly check if a number is within a range??

How can I do this elegantly with C# and .NET 3.5/4? For example, a number can be between 1 and 100. I know a simpl...

JOptionPane Input to int?

I am trying to make a JOptionPane get an input and assign it to an int but I am getting some problems with the varia...

Convert char to int in C#?

I have a char in c#: char foo = '2'; Now I want to get the 2 into an int. I find that Convert.ToInt32 returns th...

Convert AlphaNumeric To Numeric And Should Be An Unique Number?

I want to convert an alphanumeric(string) value to numeric(int). alphanumeric values like 'af45TR'. I wanted that nu...

Convert Int to String in Swift?

I'm trying to work out how to cast an Int into a String in Swift. I figure out a workaround, using NSNumber but I'd...

Converting a double to an int in C#?

In our code we have a double that we need to convert to an int. double score = 8.6; int i1 = Convert.ToInt32(score)...

Trying to use int in getline?

cout << "How many questions are there going to be on this exam?" << endl; cout << ">>"; getl...

“invalid literal for int() with base 10:” What does this actually mean??

Beginner here! I am writing a simple code to count how many times an item shows up in a list (ex. count([1, 3, 1, 4,...