Beginners - September 2016 (Page 26)

when to use #include?
 
I'm currently writing a pretty big program separated into .cpp and .h file and i have a question about #include's: -I know that if i include an existing c++ lib...
[2 replies] Last: See: https://herbsutter.com/2013/08/19/gotw-7a-solution-minimizing-com... (by keskiverto)
string-array
 
Hi there! i wanna assign an array of charecters with a string like this: char myarray ={string mystring.toChararray}; i look for a method like .toCha...
[1 reply] : tnQ soooOOOO much (by miss1001)
Making a constructor for class that contains other class
 
I'm making a constructor for a class "Check", that contains "CheckItems". CheckItems contains another class called "Article" in it. The check class has a static...
[11 replies] Last: I think I understand this better now. I was having trouble because I t... (by dhayden)
Class help please (1,2)
 
As an exercise I have to write a rational number class, show it in its reduced form, and be able to perform addition, subtraction, multiplication and division. ...
[22 replies] Last: Thanks to everyone who took the time to post and help. I have managed ... (by jamesfarrow)
trouble with arrays, sorting, and calculating the median of grades entered.
 
Hi guys. I am relatively new to programming and am having trouble writing a code where the user can enter how many grades he wants and the program will sort the...
[2 replies] Last: I can't figure out why I can't input the number of grades I want, it ... (by chicofeo)
Used a bunch of GOTO's, loop instead?
 
So after getting this far I visualized the flow of my program and thought "I think I just wrote spaghetti code". Being a noob I was aware it was bound to happen...
[4 replies] Last: +1 Too Explosive As @Too Explosive said you can use functions... all ... (by shadder)
help with for loops
 
Trying to get 'parallel arrays" to match up and give product, price, and have user input quantity then generate a total amount at end. Very new to C++ and havi...
[5 replies] Last: Like this? #include <iostream> using namespace std; int main() { s... (by shadder)
For Loop Isn't Looping More Than Once
 
I need help with a for loop. On line 44 I'm trying to establish if the integer 'choice' == 5, I ask the user for a value to store in integer 'amount'. Afterwa...
[5 replies] Last: #include <iostream> using namespace std; int main(){ int choice... (by closed account EyboLyTq)
invalid operands in number generation
 
hi to all, ive got an invalid operands at line 38 when running this code. i hope somebody will help me for this... ive added an excempt array to be avoided i...
[2 replies] Last: its just like lottery... i want to compare old results to new generate... (by glennford49)
by Zeyf
Need help with array sorting
 
I need some help with my first Programming lab, I have an idea of what the issues are, I know most of them occur with my bubble sort in the sortedArray function...
[1 reply] : What problems are you having? Is it sorting in reverse order? Is it se... (by LB)
assistance with array function
 
Hello, i'm working on an assignment. I'm not done but i'm stuck on the search function and display that data. Could someone please point me in the right directi...
[4 replies] Last: Got it. Thanks! (by tacuachillo)
Need Help Writing This Program!
 
Assume you are trying to rank NFL teams based on the percentage of games they win in a season. The rank of a team is determined from the percentage as follows. ...
[4 replies] Last: Your multiplying winningPerctange by 100 in the printf but your not c... (by SamuelAdams)
by Frenzy
getline(); only executes once
 
Hello, this is my first time using getline() to read in a string, I normally just use Cin, but that doesn't work if there's a space. The issue I'm having is tha...
[2 replies] Last: http://www.cplusplus.com/forum/general/197270/ (by closed account 48T7M4Gy)
Code - reset counter when using switch
 
Hey, first post and this might be a stupid question, but I am new to programming. Using a microcontroller (mbed LPC1768) to run the program. I wrote a code t...
[2 replies] Last: Using a switch like this : https://www.sparkfun.com/products/8034 So ... (by Schniffy)
easy as 123
 
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Bacterie { char nume ; int grad; }; struct ListNode { struct Bacter...
[1 reply] : I don't see a question. (by SamuelAdams)
prob ch
 
#include <stdlib.h> #include <stdio.h> #include <string.h> struct Elev { char *nume; char *cnp; int nota; }; struct Nod { struc...
[no replies]
ceva i
 
#include <stdlib.h> #include <stdio.h> #include <string.h> struct Nod { struct Nod * prev; struct Nod * next; int val; }; struct Lista...
[no replies]
Array sorting and inserting help
 
I need help with sorting an array and then inserting a number. It outputs what im assuming is a memory address and the first number inserted isnt in the array I...
[1 reply] : The problem is on line 80 for (int j = 0; j < numberOfValidEnties; j+... (by Thomas1965)
Weird symbols being printed when printing string value
 
There are some weird symbols being printed while printing the desc string. I dont know what the problem is. Please review these code and let me know what i am d...
[1 reply] : 1. What is on line 28? Do not mix totally unrelated systems (new&dele... (by keskiverto)
A Strange Bug in Iteration (print value != return value).
 
The following is my code. int test(vector<int> input, int ind){ if (input !=5) { ind++; test(input, ind); } else { cout<<"...
[3 replies] Last: Thanks all. dhayden's solution is working. Thank you! (by a0087946gy)
September 2016 Pages: 1... 2425262728... 34
  Archived months: [aug2016] [oct2016]

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