Beginners - September 2015 (Page 13)

counting characters
 
I'm building a program I'm stumped on a part. I'm wanting to use setw() but for the length of the gap I want it to be the length of the number of characters ...
[7 replies] Last: I just realised you can re-size the cmd box..... (by learningcplusplus898)
How do I get the names to print then ask me for the amount?
 
Write a program that will ask the user how many of each type of cookie they want and will then print out an itemized receipt. Bob’s Buttery Buttons - $5.99 ...
[2 replies] Last: Have you thought about using arrays of struct's or classes to program ... (by closed account 48T7M4Gy)
pass an object to a member function
 
I just don't understand why "s.total_val" works here. By doing the command "s1.topval(s2)"; topval(...) is a member function for object s1 therefore it can acce...
[4 replies] Last: Thank you so much Renthalkx97 and MiiNiPaa! (by zzhao0610)
For simply programs, is function prototyping necessary?
 
What is the difference between: void foo(); //function prototype int main() { //... } void foo() { //implementation } and this: ...
[2 replies] Last: Formatting, stylistic reasons. Logical order as well in that you want ... (by YFGHNG)
Hard time getting pass makefile
 
Hey guys, I'm sorry to be coming here with all this but I feel like I almost have this cracked but feel completely lost. Any help would greatly be appreciated....
[no replies]
Using doubly linked list
 
I have this function below, and I'm having difficulties on where to start. I have to build a Grid World using doubly linked lists. And the function below must b...
[no replies]
why is the messy setup required?
 
Why can't the experts make using c++ with libraries automatic the way it it is with Java with its simple import directive? After many years writing code with BA...
[3 replies] Last: Thank you for your replies they have been very helpful in understandin... (by CodeWriter)
Swapping two arrays
 
nvm i got it
[no replies]
by Marth
breain=freid. do.while demons
 
it couldn't be simpler. yet it doesn't work. there is no explanation i can come to. edit: choice1 = 1.80 choice2 = 2.60 ; etc. if i put into userPayment, at...
[1 reply] : Line 54. else if (userPayment > choice1 || choice2 || choice3 || ch... (by thefly)
by kalrin
program help please
 
program that the relevant data, such as the student number, number of modules and the module codes. the program should validate the number of modules that a stu...
[8 replies] Last: You increment totalDiscount at line 86 and display it at line 116. Th... (by AbstractionAnon)
Infinite Loop
 
Why is this infinitely looping? This is my input.txt verbatim: sin 45 cos 45 tan 45 Aren't sin, cos, and tan supposed to be stored in the oper string but I ha...
[2 replies] Last: Line 38: If the last in >> operation was successful, you're going to ... (by AbstractionAnon)
by Marth
Help for While Loop
 
getting infinite looping on this beast. beast. beast. le code gets the amount of money from the User and puts into variable userChange. I need to simult...
[3 replies] Last: Having someone else look at code usually makes the writer feel stupid.... (by Duthomhas)
For loop help?
 
As you my be aware of, I am a beginner in C++ and started using classes. I am asking user how many books he/she would like to enter then used the number provide...
[3 replies] Last: The default skip value is one so cin.ignore() ignores only a single ch... (by AbstractionAnon)
by Jaman3
How to separate words on the same line in an .txt file
 
What I'm trying to do is have an input .txt file with multiple words on one line. I am able to have it produce an output .txt file but I want the words to be on...
[2 replies] Last: Thank you so much. That was all I needed. (by Jaman3)
by Phil15
keyword "new"
 
Hi I am trying to understand the implementation behind keyword new. what I have is a simple class (RandomClass.cpp) : void * RandomClass::operato...
[9 replies] Last: There is an important difference between what you posted and what JLBo... (by AbstractionAnon)
Memory allocation (deletion)
 
So I am trying to figure out how I should properly delete a matrix. I believe the code I have correctly allocates memory and sets it up correctly if I type so...
[6 replies] Last: Matrix a(2,2); Matrix b(2,1); ~Matrix a; ~Matrix b; You normally (li... (by dhayden)
D&D NPC Generator
 
I need help making an NPC Generator in codeblocks. I have gotten the name your NPC part down, I just need help on making random stuff such as numbers and bios o...
[6 replies] Last: Ok ok first try, got a female cleric with 12 str, and 15 wis/int. Abov... (by YFGHNG)
by castik
C++ Fixed Point Notation
 
There are three types of Food at a Stadium. 1) Hotdog costs $5 2) Drink costs $4 3) Nacho Hats costs $12 Write a program that asks how many of each type o...
[1 reply] : Fixed point precision is just saying that the first n digits of a numb... (by Duthomhas)
Creating a script that controls another program?
 
Hi! I'm trying to write a script that would allow me to manipulate an image-to-text software. I basically want to have the script look for an image in a specif...
[1 reply] : You might want to check out Expect: http://expect.sourceforge.net/ Fi... (by Duthomhas)
by castik
Character address size, "sizeof"
 
I get 4 bytes as the answer for each? Why is the byte size of each address the same? #include<iostream> using namespace std; int main () { int a; c...
[2 replies] Last: Thank you for your help! (by castik)
September 2015 Pages: 1... 1112131415... 42
  Archived months: [aug2015] [oct2015]

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