Beginners - September 2012 (Page 6)

C character arrays
 
Why is this character array 8 characters long: char CharArrayVar = {'J', 'o', 'h', 'n'}; But this character array is 4 characters long: char CharArrayASC...
[5 replies] Last: @ Athar You should explain that you are picking at his terminology. ... (by Duthomhas)
Bool Function Examples, Please!
 
So I'm working on a program for school and we need to make use of a bool function. The function must: prompt the player for input, variables to input the nu...
[14 replies] Last: 2. Bool Function: I seem to have no idea how to make this return valu... (by cire)
Boolean Variable to Quit Game?
 
Quick question... How can I use a boolean variable as a return at the end of a boolean function to quit a game? bool GetPlayerInput( string sPrompt, string ...
[1 reply] : @LadyDustBunny When you first declare bool IsGameOver; , you should ... (by whitenite1)
Class Box Logistics Assignment w/Coords
 
Hello everyone, So I am supposed to (1) declare an array of 5 objects of type Box, (2) call a function to load the user input into each object Rupert ...
[no replies]
Problem using for loops and if else statements to print patterns of *'s
 
EDIT: Discovered the solution with the help of experienced friend. Thanks anyway.
[no replies]
Sit IDD_UBU, sit
 
Where does the 'expression' Sit IDD_UBU, sit! come from? Just have to ask... Any idea?
[1 reply] : http://www.youtube.com/watch?v=klG9G4BDLtA (by naraku9333)
inline function
 
Write a program which uses an inline function calculateStockValue. The function takes two parameters - one is number of shares and the other is unit price of a ...
[1 reply] : inline void calculateStockValue( unsigned int shares, float price ) {... (by vlad from moscow)
help with c++ assignment
 
i need help in programming this assignment.yOUR HELP IS APPRECIATED. write a program that asks the user for a non-negative positive number greater than 1. ...
[2 replies] Last: Here's how it works: you post the code you have now, and we assist you... (by closed account zb0S216C)
by math8
Preventing the program from entering an infinite loop when a character is input by mistake
 
I'd like to write a program that only accepts positive integer inputs. And if the character q is typed, then the program has to exit. If anything else is ...
[5 replies] Last: Read this: http://www.cplusplus.com/forum/articles/6046/ (by leftcoast)
Setw not displaying correctly.
 
This is my code for displaying an object by overloading the << operator: ostream& operator << (ostream& out, Winery *w) { // print out a winery, as speci...
[3 replies] Last: So use setw(22) instead of setw(26). (by Peter87)
by DouDou
Convert a String to an rvalue of Assignment Statement
 
Hello, What is the most efficient way to convert a string to the rvalue of an assignment statement. I basically have strings that contain numbers and operato...
[1 reply] : There is no build in way to do that in C++. You could write a parser t... (by Peter87)
Error: expected primary...before ; token
 
Hey there, Brand spanking new programming student. Prepare to get a LOT of questions from me! What does "Error: expected primary expression before ; tok...
[2 replies] Last: It can mean many things. However, it's scoped to the parser. Somewhere... (by closed account zb0S216C)
What do I need to include to use IDC_STATIC?
 
Just like the title, what file do I need to include to use line 10 and 12 in this code? #include <windows.h> IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66 STYL...
[7 replies] Last: @Hashimatsu I think Aceix was suggesting that it might be better in t... (by andywestken)
standard deviation
 
im taking computer analysis and computations at ucf so im still a little new to c, im trying to figure out the standard deviation for a undefined number of ente...
[no replies]
information logging using arrays or switch
 
i have my prime number program that takes an input number and breaks that number down into the prime numbers that create it. The switch along with the function ...
[no replies]
Invalid conversion from void problem
 
I'm following a tutorial on making windows GUI using Win32 API. I've done this according to the tutorial: #include <windows.h> #define ID_FILE_EXIT 900...
[4 replies] Last: I did in the first part of the tutorial, but then "we look at another ... (by Hashimatsu)
by math8
Checking whether numbers belong to a Lucas sequence
 
I am new to C++ and this is the second code that I have ever written. I have the first part of my code which checks if a number belongs to the Lucas sequence: ...
[3 replies] Last: Yes, that makes sense. (by Chervil)
by skarla
All c++ programmers look here.
 
I wanna just ask something about snake,so to see if it is very hard project or meduim. ask in these questions: 1)How much months(time) are you learning ...
[10 replies] Last: Well, I think I could have a variable hold the amount the snake has ea... (by DesiredNote)
Simple question about '&'
 
Hi! I'm following a tutorial on creating win apps with WinAPI, and I'm curius about the '&' sign in the line "E&xit" . Why is it there? It's not showing up in ...
[2 replies] Last: Thank you =) (by Hashimatsu)
Creating a Calendar Month
 
Hello All: I am very new to this stuff but I wanted to try this out since I'll be doing this next semester. It says that I need to print a calendar month us...
[2 replies] Last: Oh no!! I'm sorry, I didn't realize that the data was aligned to the ... (by aaronfue)
September 2012 Pages: 1... 45678... 62
  Archived months: [aug2012] [oct2012]

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