Beginners - January 2014 (Page 43)

Simple while loop
 
Hi folks. Completely new to c++ and decided to start with a simple while loop program. It executes without any error messages but nothing is displayed on the co...
[6 replies] Last: @long double: i realised the problem. Thanks (by closed account iAk3T05o)
How to make classes access eachothers values?
 
Wow! It's been a LONG time since coding but am just getting back to it and have lost SOOO much knowledge. I just have a question about classes...more specifical...
[3 replies] Last: A little late on the reply but thanks to both of you. Inheritance was ... (by dtaqee88)
A lot of fraction program in c++
 
Hi everyone! My program is working well but the problem when program is complied the output gives -5/-9 instead of -5/9 if I choose 3 for Multiply fraction and...
[4 replies] Last: I didn't say like that: first:please use the code tags second: you rem... (by JewelCpp)
by chipp
bit shift (tilde sign)
 
i'm confused, why this code #include <iostream> int main() { unsigned int num1 = 0; std::cout << ~num1 << std::endl; std::cin.get(); return 0; }...
[13 replies] Last: Bits are "set" or "clear" (1 or 0). The absolute value of a signed nu... (by Duthomhas)
Break out of a while loop?
 
I have this excercise: Read a sequence of words from cin and store the values a vector. After you’ve read all the words, process the vector and change eac...
[5 replies] Last: A bit of information: Any for loop can be written as a while loop. If... (by heyyouyesyouiloveyou)
size_t - Why is the size of the largest data object limited?
 
I was looking into the mysterious usage of size_t type which I understand to be a unsigned int. Excerpt from http://www.embedded.com/electronics-blogs/programm...
[6 replies] Last: Thank you all for the replies xeef, cubbi and especially ValliusDax. ... (by anonymousxyz)
C++ Questions 4 CCC 2006 Junior
 
I was reviewing the past CCC contests and this question stumped me. Does anyone know the correct way to solve this problem. Please post code if you have any. Th...
[3 replies] Last: I think he is referring to question 4 (by Smac89)
ccc.time.h
 
Hi, I tried to run the following program: #include <iostream> using namespace std; #include "ccc_time.h" int main() { Time wake_up(7, 0, 0); ...
[2 replies] Last: Thanks a lot. (by franciscoat)
by OUIJ
Trouble crearing wrong input completely
 
I recently shared this program to get input on whether it was efficient coding. I was informed that the system("PAUSE") and system("CLS") were bad ideas. I have...
[2 replies] Last: Thanks long double I will make those changes when I get back home and ... (by OUIJ)
[WinSock] find unused socket?
 
SOCKET sock what is the value of for example sock ? or better said, how do I know that this socket is not taken? also what value it has when I close socket ...
[11 replies] Last: Yoinks! (by Duthomhas)
Which way is faster? operations with int
 
I need to do the following process: At first there are two unsigned long long int variables A and B equal to each other. A is used in a function that changes...
[2 replies] Last: Do it the right way -- the compiler will optimize properly for you. ... (by Duthomhas)
Hello World
 
Hi. I use the book ''Programming Principles and Practice using C++'' by the creator of C++ Bjarne Stroustrup The first task was the classic 'Hello world'. I...
[8 replies] Last: I dont know who has written this blog, but Its simple to read.Although... (by Pter0dactyl)
Borland C++ Help For Project
 
so this is my project(i actually have put 50 entries , but havent put them because of the word limit), and i have corrected all errors present in it , but it st...
[2 replies] Last: @ Chervil , well as i stated ive been learning c++ for only the previo... (by pranavnair97)
by nvrmnd
std::ostream objects and std::cout
 
why won't this code work ? #include <iostream> int main () { std::ostream stream; stream << "Hello World"; } i thought std::cout is a simple instanc...
[5 replies] Last: @ Garion: your second Hello World example has a mistake. It uses the ... (by Catfish666)
Is this a good way to do it
 
I wrote a code to shuffle any number of poker decks. Is this a good way to do it. #include<iostream> #include<string> #include<cstdlib> #include<ctime> #incl...
[1 reply] : #include <iostream> #include <cstdlib> #include <ctime> #include <str... (by JLBorges)
Recursive Functions Exercises
 
Hi. Requesting some problems that will require me to code recursive functions as I am not sure I understand them completely. Thanks.
[3 replies] Last: thank you. (by heyyouyesyouiloveyou)
by ritfol
false if statement executed
 
I wrote an invoice class code but I seem to have some problem with the if statement of which the conditions are false but they are still executed. Can someone ...
[5 replies] Last: Dont see any problem with the code. Aceix. (by Aceix)
Why include stdexcept and new instead of exception?
 
I discovered something interesting that I'm quite puzzled by which has resulted in a question I have that I can't google about. I took two example programs my b...
[4 replies] Last: http://en.cppreference.com/w/cpp/header/exception http://en.cppreferen... (by cire)
Arrays 2
 
What wrong with this program..........? Any one help #include<iostream> #include<conio.h> using namespace std; int main(){ int n ,m ,b ; cout<<"Enter OOD Numb...
[5 replies] Last: I m trying to arrange two arrays in one array............in ascending ... (by Imad ali)
Determine largest value and its occurences in an input stream.
 
If I type in three '5's I get 53 as the highest number and 0 as the number of times that high number appears. If I type in 6, 7, 7 I get 54 as the highest numbe...
[no replies]
January 2014 Pages: 1... 41424344
  Archived months: [dec2013] [feb2014]

This is an archived page. To post a new message, go to the current page.