- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 11
- Posts with Downvotes
- 10
- Downvoting Members
- 3
Re:
Hello everyone. I recently started using C++ and blah blah blah you know the rest. Using my extremely limited knowledge, I attempted to make a basic 4 function calculator CUI in C++. The code I wrote is as follows. [CODE]#include <iostream> #include <string> #include <sstream> using namespace std; char operator … |
|
Re:
The greatest common divisor of integers x and y is the largest integer that evenly divides both x and y. Write a recursive method Gcd that returns the greatest common divisor of x and y. The Gcd of x and y is defined recursively as follows: If y is equal … |
|
Re:
This is a timer class that I wrote a while ago (cleaned up a bit for the snippet) for adding delays in some of the games I have written over the years. Note: I normally have the class functions in a .cpp file but since it looks like I can … |
|
Re:
Below is my code for printing prime numbers up to a given input by user. However, my calculations are not working correctly and my output is printing twice. Any idea? :sad: #include <iostream> #include <cmath> using namespace std; void prime_num(int); int main() { cout << " Enter a number and … |
|
Re:
Just use the SetTimer function after you Create the window , and just handle the WM_TIMER message inside the message loop. That's it ! |
|
Re:
Here is simple Digital Clock coded in C++ and compiler used is TurboC. A class DIGIT is designed to draw digits. Follwoing are the details for this class: Consructor: DIDGT(); for default settings DIGITE(int s,int c,int st); for user define settings s -> is size of the digit c -> … |
|
Re:
Hi all, I am fairly new to C++, but i am having trouble declaring a 2D dynamic array. Any help will be appreciated. Thanks |
|
Re:
Define a 5 x10 2-dimensional array of integers (5 rows of 10 columns), randomly generate 50 numbers between 1 and 100, assign them to the array elements and display all the numbers on 5 lines of 10 integers each. [code=cpp] #include <iostream> #include <ctime> // For time() #include <cstdlib> // … |
|
Re:
Wat is the size of string?does string have specific size..??as like integer... Float.. Double.. Char...?? |
|
Re:
I'm trying to overload the assignment operator. The objective is to copy two linked lists. I copy the first element fine, but for some reason the second loop around I encounter a null pointer and my loop ends on me. My brain is fried from over-studying and I can't think … |
|
Re:
This code is supposed to determine for a number of random numbers whether its odd, even , prime. At the end all random numbers should be displayed and the prime ones together with the number of odd and even numbers and their %. The part of the code to determine … |
|
Re:
I had to write a fraction calculator program and my only problem (I think) is when I input the two fractions it gives me garbage - for instance if I put 1/2 + 1/2 it gives me 1374389536/687194768 - can anyone help me correct this please? Thanks! divisionByZero.h [CODE] #include … |
|
Re:
I have add the two functions the add and subtract I have to now add the multiply and divsion functions can someone help |
|
Re:
In Las Vegas random numbers move billions of Dollars in and out of gamblers' pockets. For the mildly inquisitive here is a test of three simple generators. |
|
Re:
Hey all I have seen a lot of stuff about palindrome checkers so I thought I would write one that works for STL containers as well as arrays. it accepts a bidirectional iterator to the first element and an bidirectional iterator to 1 after the last element. Included is a … |
|
Re:
i want to find the length of a string but by using string.length() or string.size() well i don't really get the length of the string coz if i have a space well it won't read further. Eg "Hello world!!!" will return me 5 coz it will stop at the space. … |