First  |  Prev | 
Pages: 84 85 86 87 88 89 90 91 92 93 94
A Quickie about the modulo operator %
Hi group, I have a quick question that has been confusing me: I have the following bit of code (int a class): { cout << "Please enter n for Caesar encryption: "; cin >> password; password = password % 26; return OK; } password is of type int (but i tried it with char and short also). When for exa... 21 Jan 2006 06:27
What is panic?
Hi All, Here are some routine, I can't understand what are they doing: /* Panics the application unconditionally. */ void Panic(void); /* Allocates sz words and returns a pointer to the memory if successful. If the memory allocation fails, the application is panicked. */ void *PanicUnlessMalloc(size_t... 10 Jan 2006 19:13
[C++] <cctype> for <ctype.h>?
Is <cctype> a standard header, or is it a Microsoft implementation of the old <ctype.h> header? The reason that I'm suspicious is that I can't find it at http://cppreference.com/. I apologize if I'm asking this question in the wrong place, but I wanted to use <cctype> in a program for school. However, I didn't w... 21 Nov 2005 19:53
Basic questions
Can someone confirm what is the exact meaning, in Math, of the following two questions? 1. What's the value of the digit 4 in the number 189.064? 2. Round 13.567 to the nearest hundredth. Thanks in advance! ... 20 Nov 2005 08:34
sort a struct of arrays
i've been looking through the topics here and i can't quite find one that helps me. i'm trying to sort a struct that contains three arrays using the sort() function. the three arrays are parallel and need to be grouped together when it is sorted. for instance, if i sort the int array by ascending order, i need the ... 28 Oct 2005 05:34
The C++ Answer book?
i heard that there is a book which contains the exercise answers for all the program projects / exercises in Stroustrup's 'The C++ Programming Language'. i dont have a lot of cash right now and so the last thing i want to do is splash out on another pricey book that i dont really need. i have not deceded whe... 13 Oct 2005 10:20
Default value for user input
Hi, I want to ask for several values and enter should go for the default. I tried the following: int a = 0; cout << "Enter a value, hit enter for default [0]: "; cin >> a; It doesn't work... any idea what I can do? Regards, Jochen ... 7 Oct 2005 13:27
how to convert integer to string
i trids itoa, but it is not compiling. so please tell me how to convert integer to string ... 27 Sep 2005 04:01
prime numbers
I've been working out of Bruce Eckel's book, and I am trying to solve the following problem: Write a program that uses two nested for loops and the modulus operator (%) to detect and print prime numbers (integral numbers that are not evenly divisible by any other numbers except for themselves and 1). Here is w... 18 Sep 2005 12:45
C++ Quiz
I am an experienced Java Programmer and i am writing a code in C++ that takes in a string and reverses it for example when i enter {How are you doing }it ouputs{ doiing you are How} I have written this code that does it but i was wondering if there are Stack Classes in C++ which would have enable me to have a... 12 Mar 2005 11:03
First  |  Prev | 
Pages: 84 85 86 87 88 89 90 91 92 93 94