Beginners - February 2010 (Page 4)

by Tamok
Slot Machine code issue
 
Hi to everyone =) I am pretty new to c++ programming and tried to start making a slot machine console program to check if I could solve it on my own. Sadly, ...
[5 replies] Last: Thanks a lot to the both of you =) I guess lack of sleep is not re... (by Tamok)
Vectors and Pointers
 
I am working on something where I have a class "person" with two fields name and age. A class "car" with 3 fields, the model, a pointer to the owner (person *),...
[6 replies] Last: You could also just push_back people and let the vector do the dynamic... (by firedraco)
how to use switch statement
 
Try to do the following question; Write an if statement to do the following: If char variable gender is equal to 'M' or 'm', then display "Male"; if it is equa...
[3 replies] Last: The great thing about switches is they can be used just like if/else s... (by gcampton)
The memory could not be read
 
I am just starting c++. The problem is that with my function I get the error mesage: The instruction at "0x7c9369da" referenced to memory at "0xffffffff" The me...
[4 replies] Last: positions[j+i*n] =i in other words, 2 is not a valid index... (by blackcoder41)
not sure how to procced
 
Hello all, I am writing a program for an assignment that reads in two positive integers that are 15 digits in length and then outputs the addition and subtra...
[6 replies] Last: The problem is your dealing with arrays, not numbers. you need to look... (by gcampton)
C++ with vectors
 
I am trying to use vectors(in Visual Studio 2008) to make a program that asks how many favorite games you've got, then to list the games after typing them in. ...
[10 replies] Last: Good luck. (by chrisname)
Password!!
 
class Account { private: int overdraft ; float balance ; char *name, password ; public: Account(char *N , float bal , int overdrft) ; Account() ;...
[3 replies] Last: What are the errors you need help with? (by Zhuge)
Question about loops and columns
 
I am very new to C++ with only a few months experience. I have encountered a problem that is becoming challenging for me to fix. I have been given an assignmen...
[7 replies] Last: [quote=Always Anonymous]My problem is making the second for loop work ... (by Zhuge)
main() return value
 
I have seen many programs use return false for main() when an error is occured. Is this correct? It seems to me that return false = return 0 = return EXIT_SUCCE...
[3 replies] Last: YES, bool is cast to int and int is cast to bool.. int foo() { ... (by blackcoder41)
recursion
 
pls help me.. i need to make a program using recursion.. for example.. user will input 3+2.. the concept of recursion should be 3+1+1 and that the program will ...
[3 replies] Last: int mul(int n, int m) { if(m==1) return n; return n+mul(n, ... (by blackcoder41)
Copy- Constructor
 
signature of Copy Constructor for class X is X(X&) Can we declare it as X(const X&)
[3 replies] Last: Thanks @Disch and @Jsmith (by ankushnandan)
Why am I getting this error?
 
Can someone please tell me why I am getting this error? 1>c:\users\nbe4u\documents\visual studio 2008\projects\take 1000\take 1000\take 1000.cpp(16) : error ...
[7 replies] Last: I added 4.0 just to try. It still hasn't fixed anything. I used 100,10... (by littlemissb)
delete repeats..
 
pls help me i making a simple program that deletes duplicates.. just a simple program pls..example:input:1 2 2 4 3 3 2 4 5 output: 1 2 4 3 5pls help me deal wit...
[1 reply] : Code tags. And please, please stop using icky nonstandard conio. (by tummychow)
A few questions..
 
I will be working on a program this evening to calculate the average of test scores while dropping the lowest test score. I'll have a few questions, startin...
[10 replies] Last: You still don't have code tags or indentation. With that amount of cod... (by tummychow)
error with opendir()
 
I'm trying to open a directory stream, but I get an error with opendir() whether or not the directory exists. #include <stdio.h> #include <stdlib.h> #in...
[2 replies] Last: DUH.... that's pretty embarrassing, but I guess I just looked at it t... (by grcunning)
Function pointer returning null
 
Hello! I'm trying to employ DLLs by loading them at run time, but have run into a snag that I have not yet solved. Essentially, one of my function pointer...
[3 replies] Last: An update: It's finding the DLL - but the function pointer is still... (by ambershee)
by cmccmc
question about the increase in a for loop
 
is it possible to make it increase more than just 1 in a for loop? As in is there something else besides variable++ or variable--?
[10 replies] Last: lol I just did that as you typed that because I was just about to post... (by cmccmc)
How to Exit loop with constant literal ??
 
I am trying to make a while loop that exits when the user inputs the word "done" - however it loops endlessly. I am sure this is something simple that I am mis...
[7 replies] Last: I haven't found myself having to use char in a while I alway use strin... (by OnymousIllusion)
Text Editor?
 
Hey, I just started learning C++ and I learnt the usual: • variables, data types, and numerical operators • basic input/output • logic ( if statements...
[4 replies] Last: OK - so you want to do windows GUI programming. here is a tutorial si... (by guestgulkan)
Looking for a better way to write this code...
 
I have this piece of code that I think may be improved but I can't think of a good way of going about it. Hoping someone understands and can help me. Below ...
[2 replies] Last: Opps forgot a detail... I have to save off IncAmt to use elsewhere. (by AlwaysLearning)
February 2010 Pages: 123456... 32
  Archived months: [jan2010] [mar2010]

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