Beginners - November 2016 (Page 33)

Changing elements of an array.
 
Hi, I am in a beginning C++ class in college and I need some help with building a programm. So basically i need to design a program, that changes elements of an...
[2 replies] Last: I know how to create an array and how to change array elements with 1'... (by Jan4ezz)
Segmantation Error when running program
 
I am writing a program to create a text editor using a main.cpp file and a linked list class called LineList, and I keep hitting a segmentation fault when the m...
[2 replies] Last: All the code necessary to completely run the program would probably ma... (by gdsturgill)
by gl3nnn
Filling 2d array with alphanumeric characters
 
So my code below compiles. However, whenever the console window pops out it just crashes. Is there something wrong with my code, particularly at the getRandom f...
[4 replies] Last: Thanks for the correction, coder777 Was this what was intended? The p... (by lastchance)
For Loop (Help Needed)
 
Write a for loop that print out the multiples of 3 up through 39, separated by a blank space. 3 6 9 12 15 18 21 24 27 3 33 36 39 For (
[4 replies] Last: For loops are most often used to create bits of code that will run a s... (by Shifty189)
Text Output Alignment
 
How can the output of a string be fixed to a position to where regardless of the amount of characters in the input, the alignment won't be thrown off? I'm w...
[2 replies] Last: Bro setw() is the manipulator which allows you to specify a column for... (by kamal choudhary)
by ncaver
BubbleSort (1,2,3)
 
Write a function that performs a snap for the numbers array void swap( int i, int) { int k; int l; i=j j-k }; Im just wondering am I on the righ...
[42 replies] Last: void swap(int &value1, int &value2) { value1 += value2; ... (by boost lexical cast)
by KaylaL
Output error using enum and for loop
 
I am having trouble with the output on my program. The Switch statement causes only the endingDate to output. When I added the For statement at line 126, it con...
[no replies]
Compiling and Executing in Windows CMD
 
Hi all, I have been writing some C++ programs in Microsoft Visual Studio Express 2013 for Windows Desktop and I would like to start writing my programs using...
[5 replies] Last: I think I would agree with Shifty189 - MinGW is very good. It includes... (by lastchance)
dealing with some logic errors pt 2
 
Hello again. This time I had done a prog that will print out prime number, even number and also odd number from specific intervals. My problems were the output ...
[3 replies] Last: Got it. Thanks a lot! (by raisudessu)
by olaf94
Finding combination of numbers that add to 20
 
So for practice I want to create a programm in C++ that starts with an array of 10 numbers between 1 and 15 and then finds the best way to add those individual ...
[3 replies] Last: The search for combinations that add up to 20 (or whatever) looks like... (by lastchance)
New source problem in Dev c++
 
Hi, I would like to ask help on this: I use Dev c++. When I add a new source file to the project ("Project"->"Add to project") it works properly and I can bui...
[no replies]
Removing duplicate words in a string
 
I am trying to solve a problem with my code that essentially deletes or removes repeated words and takes a count next to each word, of how many there are of tho...
[4 replies] Last: To the OP, on line 46 of the code in your last post you use the erase-... (by cire)
error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}'
 
*EDIT* I'm having issues with this coding, for instance line 30 says 'error: invalid operands of types 'float' and 'int' to binary 'operator^'. Im trying to mul...
[4 replies] Last: Don't use goto. If the program needs to run again have loopback set to... (by joe864864)
Homework Problem, Arrays of Payroll objects
 
The problem states that: Design a PayRoll class that has data members for an employee’s hourly pay rate and number of hours worked. Write a program with an a...
[6 replies] Last: Everything works fine. I meant if it was bad programming practice. I ... (by cire)
by Zorai
Need help with this C++ exercise. Counting how many vowels in a sentence
 
Hello, I'm working on the following exercise but this is as far as I got. Here is a picture of what happens when I run it: https://puu.sh/sa8Nk/f7cde65740.png. ...
[5 replies] Last: http://www.cplusplus.com/reference/cctype/isspace/ (by Boxbird)
Removing user input duplicates from an array, and displaying results as a new array.
 
Hello everyone. I am working on a homework assignment for my C++ class where I have to create a one dimensional array that takes in 20 numbers from the user wh...
[4 replies] Last: Here is an option. Sort the array and test the current value with next... (by tibrado)
C++ Program
 
Hello, I'm new into coding and I just have a question about coding. In my class we had to create a random walking program where a person goes from a position to...
[2 replies] Last: OP: this example is straight out of C++ Primer (5th ed) by Stephen Pra... (by gunnerfunner)
accessing member functions from inside funtions (other than main)
 
Hi, i'm having trouble accessing custom class member functions while inside a non main function. i'm clearly missing fundamental here. any help would be appreci...
[7 replies] Last: Turns out my problem was that i was creating the class objects inside ... (by Shifty189)
by lolpwn
reading a txt file
 
I'm working on two programs, one that continuously asks you to choose a item from its menu until you press x, which ends the loop, and saves the total cost of a...
[8 replies] Last: Wow Thank you it works (by lolpwn)
Prime numbers between and upper and lower bound
 
Back story: I have a test tomorrow and my teacher usually makes us type a code from scratch. This time, he typed a code during class while we watched on the pro...
[4 replies] Last: #include<iostream> #include<cstdlib> #include<cmath> using namespace... (by Boxbird)
November 2016 Pages: 1... 3132333435... 44
  Archived months: [oct2016] [dec2016]

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