Beginners - October 2013 (Page 11)

named/defined constants--Help please
 
I'm not sure how to use a named/defined constant for maxes. Help please. Here's part of my assignment. Thanks in advance.
[1 reply] : C++11: constexpr int MAX_SQUARE_SIZE = 10 ; C++98: enum { MAX_S... (by JLBorges)
by Ltp
Linked_list_insertion
 
**Can Anyone tell me whether this function can be done recursively or not..? void insert_front(node *&head, int x){ //head initialized as NULL in the main() ...
[3 replies] Last: Hi there, Your linked list will always need to keep a pointer to at l... (by closed account o3hC5Di1)
10 digits per line
 
Noob here. I'm having a problem outputting 10 digits per line on part of my program. I'll post part of the program. Any help would be appreciated! case 1:{ co...
[1 reply] : What issue are you having? Also, is count declared earlier in your p... (by Albatross)
Please Assist me most urgently
 
Ok, im having trouble creating a simple class called "Wage" that will determine the pay for each of several employees. The company pays time x1 for the first 4...
[5 replies] Last: Sometimes i can't figure out the best way to explain a problem -I have... (by eyenrique)
Been trying to figure this out all day. Help!
 
errors: Invalid conversation from 'DWORD' to 'DWORD*' initializing argument 3 of 'DWORD FindDmaAddy(int, HANDLE, DWORD*, DWORD)' I've been trying to figure...
[3 replies] Last: Well that's embarrassing, it was something that small. Thanks for the ... (by Dominic4774)
by losv36
comparing array
 
The homework assignment is to create a program that stores ten integers in an array. Then the array is used as an argument for a function that outputs the sum o...
[6 replies] Last: Thanks a lot man you were really helpful. (by losv36)
separating a three digit number using reference
 
So heres what I have to do Write a function called breakThree that will accept a 3 digit integer and returns each of the numbers individually. This function wil...
[8 replies] Last: Please stop posting this in multiple threads. I already answered this... (by Disch)
Split string variable.
 
I have to split fullname string variable into First name and Last name. And write function that write the converted employee's full name, grosspay, net pay to ...
[1 reply] : #include <iostream> #include <string> int main() { constexpr cha... (by JLBorges)
I need help!
 
Hello guys. I am super new to programming, and need some help with an assignment im working on for my college class. We are making a program that determines how...
[16 replies] Last: One tip is you should avoid such long lines of code. Try to keep them ... (by giblit)
by toast9
adding a string to another string
 
How would you take the letter/numbers from one string and add it to another, then continue adding and building on the second string?
[3 replies] Last: can i see the relevant code please (by Cronnoc)
by toast9
Making char the letter value instead of number value
 
I made a switch statement so if the variable is a number it'd make it a letter, but when I output the answer its the number value of the letter I made it. (at l...
[3 replies] Last: I figured it out. I made a second variable as a char to hold the lette... (by toast9)
by jaykis
How to print the elements of an array
 
I have to write a program that order the elements of an array in a specific way. Then, take input values from the user to fill the array and print all the eleme...
[1 reply] : You don't need const int N = 10 , it will work just fine to have int... (by Protomega)
"while" function
 
am i using the "while" function correctly? i'm still trying to work out the problems but i just want to make sure my "while" function is placed properly. ...
[4 replies] Last: I'm not sure what the second while loop is for. From my expeirence, y... (by fahmankhan75)
How to create a for loop using class data?
 
Hi all, I need to create a for loop for five students using my class. In that for loop, I need to have another loop that asks for the grade for each of the ...
[2 replies] Last: I haven't learned how to do arrays yet so I have to do this without on... (by Emma Naylor)
Eliminating values from arrays?
 
Below is my code up to this point; I am making a mastermind game that will have a user input a password or have the computer randomly generate it, it will then ...
[1 reply] : Hmmm, I tried to build this code and I received errors about having un... (by Cplussaywhat)
by toast9
reversing strings
 
how do you reverse a string? For example if the string is 123 and you want it changed to 321.
[11 replies] Last: I deleted my previous post because using an array is an over complicat... (by Protomega)
Pointers to Return Two Values From a Function
 
Hello. I am experimenting with pointers. I would like to pass the circumference and volume variables using pointers instead of reference parameters. I know that...
[3 replies] Last: Yes, I see that. You have the assignments reversed in the function. (by closed account D80DSL3A)
Using ComputerMove() for computer to win
 
Hello. I am a beginner and I've been tasked to write a tic-tac-toe game in which the human always wins. I have the ComputerMove()function in my game as well a...
[3 replies] Last: the computer has no ai here is my tic tac toe computer move code (i us... (by Cronnoc)
Mathmatical function trouble
 
I cant quite seem to get this totalsum function to work. what I want it to do is if the user enters 4, it changes total to 10 (1+2+3+4=10). after trying severa...
[2 replies] Last: ... well, I feel intelligent... thank you. it works now. (by Tiawulf)
by iamk2
Start C++ console app from shell file
 
Arch linux OS 1. I have compiled my program successfully. 2. Open Xterm - cd to proper directory which contains the executable and supporting data .txt files a...
[2 replies] Last: As soon as I read Relative Paths I put changed my shell file to cd /h... (by iamk2)
October 2013 Pages: 1... 910111213... 86
  Archived months: [sep2013] [nov2013]

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