Beginners - September 2012 (Page 24)

by Z feng
a String Length Function without using <cstring> (1,2)
 
There is a very beginner assignment. It suppose to be a C++ program, not a C program. C++ has one, but C has no "string" data type. So i want to use arrays of ...
[26 replies] Last: get it! Thank you so much! (by Z feng)
Problem in a very simple program if user inputs float in a variable that is defined as int.
 
Hello everyone! So I recentry started to study computer science in a university. Hadnt had any background in c++ before or any other popular language. In my p...
[3 replies] Last: If n is supposed to be an integer than the user of your program is j... (by Housslv)
I need a forumla
 
To convert ASCII into a number. For example, if I had ASCII 50. I need to convert into the number 2. My prof was saying some thing about sum of crap.. And... ...
[6 replies] Last: Tntxtnt's code would work perfectly. (by DesiredNote)
How to make the 'switch' function hold 2 characters?
 
There is this problem I am trying to do, the instructor asked us to do in both "if" and "switch" ways, the "if" was easy but how exactly do you make a switch ho...
[14 replies] Last: BTW, the reason a switch doesn't work for this is (basically) the same... (by Mathhead200)
I don't know what's wrong with my array.
 
This program's supposed to ask for the size of a given seat plan and the seating arrangement (numbers), then it's supposed to ask how many times to swap, then i...
[7 replies] Last: Thanks. Wow I feel really stupid for not seeing that. I'm very new to ... (by miguel11795)
Maximum, Minimum and Average?
 
Hello, I just need a brief answer: To find the max/min/average of 5 numbers (input from the user), must there be use of loop statements? Can it be only "if" st...
[3 replies] Last: Most programmers would go for the loop option, I think. What if you ha... (by TheIdeasMan)
Loop just goes on..
 
Hi Im new to c++ and tries to solve this: Create a program that finds the average min.temp, max.temp, rainfall and total rainfall a given month. The pr...
[7 replies] Last: You need to include a for loop that runs for the # of times that they ... (by freddy92)
Checking for repeats using loops.
 
Good day everyone, I have two questions as of now. I am working on a homework problem where I place 20 (1-20) jersey's into 20 lockers randomly. I am using UN...
[8 replies] Last: int arr for (int i = 0; i < 20; i++) //Populate array with 0-19 nu... (by freddy92)
Problem while testing class methods
 
Hi all, So for a c++ assignment I am creating two classes, Product and Store. I got my product class working and tested it successfully, however, I'm having is...
[8 replies] Last: Since you're reading in the entire Store object in the constructor, I ... (by cire)
Mouse Programming
 
I am trying to design a text-based game in which you click on the choice you wish to select. Can someone please explain to me how to implement mouse clicks in ...
[6 replies] Last: Either use PDCurses or use the Win32 Console functions. You will hav... (by Duthomhas)
cout << ( row % 2 ? "<" : ">" );
 
Hello, I'm stumped on this. cout << ( row % 2 ? "<" : ">" ); I think that the question mark means that there's a cout if/else with < and >. Is that righ...
[14 replies] Last: thanks a bunch (by cheshirecat)
by SGM3
Classes (1,2,3,4)
 
I would like to make a small text based rpg, with some basic items and enemies. My question is how would I create a class to get equipment. I want it to act ...
[65 replies] Last: This is really neat. I have watched it over and over again. I would li... (by SGM3)
Help! (updated code)Using Functions and bool to add hours and minutes
 
I have the following Function Prototypes: bool validMins (/*not sure what goes here*/); bool validHours (/*not sure what goes here*/); const int MAX_MINS ...
[11 replies] Last: If this means rearranging the order of the function calls, I cannot do... (by Trac511)
need help in function
 
I'm having problems here with lowPosition , i don't know what i'm doing wrong but it's always 0. i would appreciate some help, thanks in advance. void low...
[3 replies] Last: There is no such member function declaration as void words() inside th... (by vlad from moscow)
by coobs
invalid operand errors galore
 
Hi all, i'm new here and new to programming. Searched forums but for some reason still can't find the solution to this errors I'm getting: error: invalid opera...
[5 replies] Last: They are very strange errors. They should not be. Try to include head... (by vlad from moscow)
••Resizing HELP!••
 
I looked all over the internet but I still don't understand how to make it so you can't re-size the console. NOT FOR HOMEWORK! (I AM ONLY IN MIDDLE SCHOOL)...
[6 replies] Last: I have used Google. (by Forseth11)
overloading cout for a template linked list
 
Good morning everyone! I need a little assistance in overloading cout for my linked list. The truth is, I have no idea how to do it. I tried searching everywhe...
[3 replies] Last: So the ListNode<> and List<> types are distinct classes? If they are, ... (by Duthomhas)
by clodi
my first GAME!!!
 
Hello people, I started C++ 2 months ago and last night I finished my very first project!! Could you please compile it and leave some comment/feedback for me?...
[8 replies] Last: again, thank you very much I think I will go for the controversial on... (by clodi)
1 error in my program please help
 
#include <iostream> using namespace std; double math(int test1, int test2, int test3, int avg){ avg= (test1+test2+test3)/3.0; } void output (dou...
[5 replies] Last: I got it all working and received a 100 on my program, thanks for the ... (by EternalTactician)
Stacks
 
Ok...I wrote this code up, which works fine for converting an integer to base 2. The only problem I'm having is how do I reverse the stack? Will anyone help? He...
[3 replies] Last: Thanks Aceix and Computergeek...I'll give this a try! :) (by GalaxyM31)
September 2012 Pages: 1... 2223242526... 62
  Archived months: [aug2012] [oct2012]

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