Beginners - January 2013 (Page 31)

A simple C++ problem
 
Hi, I have written a program, that would find the prime factors of all numbers upto 1000. there should be 999 outputs. but the outs arent really the sum, what s...
[13 replies] Last: Is prog your executable name? (the .exe file) (by closed account 3TXyhbRD)
How would I get the width and height of an HBITMAP?
 
I need the width and height of an HBITMAP for the BitBlt() function. How would I get those?
[4 replies] Last: I don't know whether that worked or not because I can't compile the pr... (by FlyingMonkey456)
by harsha
Declaration of an array of vectors
 
When i compile this prog, i get errors sayin 1.'d' undeclared" 2.Each undeclared identifier is reported only once for each function it appears in. what is the...
[6 replies] Last: There are two problems with the original code. d only exists within t... (by cire)
Problem with for loop exercise
 
I'm trying to work through some exercises on for loops and I'm stuck on this one: Write a program that takes two integers (one lower and one higher) and repo...
[3 replies] Last: no prob. (by closed account LN7oGNh0)
3 ways that classes can relate to each other...
 
Hello, I am not understanding what a homework assignment is asking... Name three ways that classes can relate to each other. Would by Inheritance be one? ...
[2 replies] Last: Thank you. I thought I was on the right track but was unsure. (by cmarcello)
Sieve of Eratosthenes-Runtime error!
 
The task is to create a program that points out all prime numbers within the range of 0-100 using the Sieve of Eratothenes. Since the beginning of the text boo...
[10 replies] Last: I hope I haven't made you feel a bit down with all my comments, they'... (by hunter86bg)
C++11 Perfect forwarding question
 
Hi everyone, I'm slowly starting to understand rvalue references and their benefits. At the moment I'm creating a templated facade class, so I thought it mi...
[8 replies] Last: That's exactly what I was after, thank you very much! I think I can fi... (by closed account o3hC5Di1)
problems with char variable
 
#include <iostream> using namespace std; char username, password; int main() { cout<<"What is the username?\n"; cin>>username; cout<<"\nWhat ...
[9 replies] Last: Thanks Chervil for the help. (by closed account 18hRX9L8)
Question about void pointers.
 
Hello guys. I would like to know what's the difference between this to statements. void function_test(void *l) { //Both works fine, so, what's the differe...
[1 reply] : In C there is no difference. In C++ the first one doesn't compile beca... (by Peter87)
by Meden
float accuracy, 0.1 + 0.2 == 0.3 is false
 
I have just ran into this idea, that a 0.1 float in a computer is not actually 0.1, so I was wondering if there might be either a better data type than float or...
[1 reply] : The bank computer would use one of two solutions. The first is to us... (by Chervil)
convert a string to a double
 
On the last part of my program, I am trying to convert a string to a double, the code I have compiles but will not run once the program gets to that part of cod...
[11 replies] Last: Hey I found a way to parse from string to int on the references in thi... (by TheBeardedQuack)
Help me please !
 
Write a function that simulates a slot machine by printing three randomly chosen strings as the values displayed by the slot machine. Each string should be cho...
[3 replies] Last: Right I'm afraid this question is a little two easy for me to try and ... (by TheBeardedQuack)
Structs inside Classes (I've gave 2 Answers, but which is right?)
 
Hey guys, I simple want to know if this would work in my Object class or if I would have to declare an instance of the structs within my class? #include <...
[2 replies] Last: Thanks pal, I was afraid I would :) Shouldn't really be a problem thou... (by TheBeardedQuack)
by MK 4
New guy Questions
 
Hey all, Im new to the furum and new to C++ . I decided that if I was to be serious about learning this programming language I should get input, and ask questio...
[5 replies] Last: I would just like to suggest that you take a look at thenewboston tuto... (by IronmanCro)
Need help with switch function based calculator
 
Hello! I'm trying to write a program that will simulate a calculator by using switches that call functions to perform the desired task. When I try compiling I g...
[7 replies] Last: But the same argument would be applied to putting them into a class. W... (by Zaita)
More Efficient
 
I am new to C++, and for a beginner project I figured I could write a program that does the Pythagorean Theorem. It's work's like a charm ( i think haha) also i...
[6 replies] Last: Wow JLBorges thank you so much for this. It would have taken me foreve... (by TheFlyingByrd)
by mr4k
static_cast<class<T>> error
 
I'm obviously very new to c++. I have a class Vector2<T> and I'm trying to cast a void pointer to it using a static_cast. However the ide(xcode) seems to not ac...
[8 replies] Last: Think higher level than this. Why do you need to have different attrib... (by Zaita)
Using two different data types in for statement
 
Hello, i'm on an exercise in Programming: Principles and practices using c++. I've tried many different things but i just can't get this for statement to work. ...
[3 replies] Last: Please, see my changes in the previous message.:) (by vlad from moscow)
read arguments from input
 
I have an assignment where i am to read arguments from the user. A special format is to be applied though. For example : -d 3 -D 3 -c 5 -u raw -g thisFile Thisn...
[5 replies] Last: No Problem (by closed account 18hRX9L8)
Creating files & file maintenance ability
 
Hello, I am new to C++ and have taken on a simple project in order to try and learn C++. I have downloaded Visual C++ 10. My question is as follows: I hav...
[1 reply] : I'm not entirely sure what you are asking for. Are you looking to mak... (by Stewbond)
January 2013 Pages: 1... 2930313233... 52
  Archived months: [dec2012] [feb2013]

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