Beginners - June 2013 (Page 2)

by anzhit
Pythagorean triplets
i made this program to print pythagorean triplets. it prints each triplet twice how do i modify it so that it only prints a triplet once #include <iostream> #...
Jun 30, 2013 at 11:20am
[12 replies] Last: heres the code And what (presumably incorrect) results did you get? ... (by Chervil)
by piczim
Setting decimal places in C program in currency convertor
I need to know if its possible to set the number of decimal places in the below code and if so how? Many thanks Rodney #include <stdio.h> #include ...
Jun 30, 2013 at 10:42am
[4 replies] Last: Yes you can use double or float instead of int (by closed account EwCjE3v7)
for loop & array
Write your question here. #include <iostream> using namespace std; # define width 5 # define height 6 int yo ; int x,y; int main() { for (x=0;...
Jun 30, 2013 at 3:37am
[1 reply] : In this case the numbers should also repeat five times again because ... (by Disch)
Overloading problem (1,2)
I overloaded the << operator for a time class i started making. The problem is that outputting an object of the class goes fine, but when i try to output t1+t2...
Jun 30, 2013 at 3:18am
[34 replies] Last: I'm sorry. I didn't mean it that way. I can just leave this discussion... (by Superdude)
Totally lost :-/
I am to write a program that determine the amount of cloth in square inches needed to make a certain kind of garment The instructions state 'Rather than usin...
Jun 30, 2013 at 1:28am
[7 replies] Last: Alright, almost there...:) I was able to debug with out any errors, o... (by rezivor)
by Andym
opening a file via function
If I am opening an existing txt file via a function, do I need to pass any info from the function to a variable? or is just opening the file enough?
Jun 30, 2013 at 12:47am
[14 replies] Last: Thank you, after thinking about things for a while, I started to think... (by Andym)
Derived class object in base class member function
Hello :) I learn C++ from a book,and now I learn about inheritance. I read this in the book(I try to translate correct): "Another source of problems is tha...
Jun 30, 2013 at 12:07am
[3 replies] Last: class deriv : public base { deriv(const base& src) : base( src ) {} ... (by vlad from moscow)
pattern
hello . i need help in this program A A B A B C A B C D A B C D E A B C D E F plz give me answer i tried it . but i only get A BC DEF
Jun 29, 2013 at 11:46pm
[17 replies] Last: @giblit how about we use floats instead of ints then we will really... (by vlad from moscow)
MSACCESS ADO COM ERROR
Hello, with about 40 hours of C++ experience I have decided to jump into DAO/ADO/NET database communication through C++. Sorry if I am jumping the gun here on ...
Jun 29, 2013 at 11:13pm
[no replies]
what thread library? I cant install sfml, c++11 threads dont work with mingw and XP and win32 threads are crazy complicated
I dont know what library to link to to get win32api to work with threads either I have been trying for a while to no avail. Is FLTK worth trying? does it sup...
Jun 29, 2013 at 10:38pm
[7 replies] Last: Let me check boost again. It's been a while since I got it set up so ... (by Disch)
Exercises for Beginners 3
1. Implement a simple "password" system. #include <iostream> #include <string> using namespace std; int main () { int password=1234 ; //anything you ...
Jun 29, 2013 at 8:57pm
[2 replies] Last: it is better than my code thx i will add it (by closed account 1v5E3TCk)
default Ctor
why we need default ctor while passing by value. class test{ private: int number; public: test(int i) { number = i; } }; class useTest ...
Jun 29, 2013 at 8:00pm
[5 replies] Last: Disch, so it is mandatory to have default ctor when we pass object by... (by Disch)
Please review my code.
Hello, so I've being learning C++ on my free time for a few months now and I was wondering how I could make this code better or more elegant. Two scores from 1 ...
Jun 29, 2013 at 7:15pm
[5 replies] Last: /****************************************************** * ... (by Momoironeko)
Exercises for Beginners 1
Hello, everyone. I am here for sharing exercises with posible solutions with them. If you have any other solutions for my exercises or you have new exe...
Jun 29, 2013 at 7:00pm
[19 replies] Last: what i can i use instead of system()? cin.get()? (by closed account 1v5E3TCk)
Syntax problem with "If"
So I have this little function here. I'm using that if to search for a vowel inside the string I'm analysing. Apparently, the syntax is fine ( typical if(condi...
Jun 29, 2013 at 6:58pm
[3 replies] Last: Working just like heaven, problem solved. :) (by Kosakosida)
GRAPHICS ENGINE & C++
Hi there! New question: C++ based tutorials and sites for learning Modern OpenGL? Old question: I'm building a car racing game and i wanted to know what grap...
Jun 29, 2013 at 6:24pm
[9 replies] Last: I don't know labopie, but it fails at installing. And i revised so mu... (by Marc Colome)
Exercises for Beginners 2
Write a small calculator that takes as input one of the four arithmetic operations, the two arguments to those operations, and then prints out the result; th...
Jun 29, 2013 at 5:22pm
[no replies]
by salh
Weird compiler error, no idea what's wrong
Something is wrong here which I // Learning.cpp : main project file. #include "stdafx.h" #include <iostream> void main() { using namespace std; ...
Jun 29, 2013 at 5:00pm
[1 reply] : You forgot to enclose the condition in parentheses. if number1>numbe... (by vlad from moscow)
by Jay211
Sample Payroll Calculation Program
1. There is a stationary business in your neighbourhood which has 2 casual workers who work a given number of hours each in a week are being paid at an hou...
Jun 29, 2013 at 4:04pm
[3 replies] Last: > i need aid don't have a clue Do it step by step. First, write a sma... (by JLBorges)
by ivan1
2D Arrays
I have a 2d array and I created it with pointers. int **array; array = new int* ; for (int i = 0; i < size; i++) array = new int ; for (int i = 0;...
Jun 29, 2013 at 2:53pm
[7 replies] Last: array must be initialized by constructor, not by {...} Sounds like a... (by Cubbi)
June 2013 Pages: 1234... 49
  Archived months: [may2013] [jul2013]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.