Beginners - November 2017 (Page 12)

C++ Procedure to Function transition
 
Hello, I started learning C/C++ by taking a class and everything was going smoothly until we had to refactor the Procedures we've done into Functions to return...
[2 replies] Last: Thanks for the reply, after looking carefully again, I realized where... (by ashley50)
by Baps
Need help adding a while loop to my codeblock. Newbie here, having some trouble!
 
This is the codeblock I'm working on, and I need to implement a while loop to run it infinitely until it is untrue. // GrossPay.cpp : Defines the entry poin...
[4 replies] Last: Nice! Ok, so I input the changes you have made, and the program runs! ... (by Baps)
by mcr1
Pointers and Dynamic Memory Allocation, using Classes
 
So, I am in my first ever C++ lab now, and I am working on this lab. I am not understanding how to even begin this. I was told to read the instructions (below) ...
[1 reply] : Design a class that has a pointer to the string array and the array ... (by Repeater)
by Hanske
Which heap pointers to delete
 
Hello, I am curious if we have pointers and pointers to pointers to pointers, which variable must be deleted? I have two scenarios below that show deferent p...
[10 replies] Last: It works because the thing on the left is the same type as the thing o... (by Repeater)
by srk100
File and Sorting 2.0
 
I am still getting.... 15: expected expression| 17: expected expression| Updated code: #include <iostream> #include <fstream> using namespace std; void s...
[5 replies] Last: thank you for the help i will see what i can do. (by srk100)
by srk100
ASCII
 
Help Help!!!!!!!!! Question: Write a program that reads the integers in the file “flints.txt” (the integers stored in the file are the ASCII code for chara...
[8 replies] Last: According to the instructions, the input file must be named flints.tx... (by mbozzi)
basic calculator
 
Hi guys so I am reading Bjarnes principal and practice for the first time,and I am going over an example he gives in the book I did modify it a little and go un...
[6 replies] Last: that's perfect Andy,completely understand now =) much appreciated for... (by adam2016)
help with system ("pause"); return 0;
 
Hello, I am writing a program for class and I feel I have the code worked out well. However when I try to run the code to see if it works, I cannot get it to "p...
[3 replies] Last: this: system("pause"); return 0: } is not in any function. Addit... (by joe864864)
Smart way to split a vector into smaller overlapping vectors?
 
I am currently looking for a way in which i can split a vector into a number of smaller vectors. I am basically trying to implement a sliding window function f...
[6 replies] Last: what do you mean by checked and unchecked slide? (by DrJones)
switch E1578
 
Problems with line 25. number "3" gets underlined and puts out an error message " E1578 case label value has already appeared in this switch at line 22" if i...
[1 reply] : You can't use expressions as case labels (you can but it's not going t... (by Peter87)
String and a loop
 
Hello! I want to get all the names that do not end with 's' and print them out AFTER I print their count. With the test that I am trying this program with out, ...
[7 replies] Last: If you put them in an array (or vector) of strings then just output th... (by lastchance)
Card Game
 
Hi there, I'm working on a school project and I've gotten stuck and I was hoping for some guidance. I've been writing testers for each of my files and thing...
[3 replies] Last: I messaged my professor and they cleared things up, my deck.cpp is sup... (by arblinked)
Issues making a Mad Lib
 
I'm trying to make a Mad Lib program for my intro to programming class. It's a little different from the other ones that I've seen tutorials for online because...
[no replies]
wrong results from a code
 
I need to count the number of character, lines and spaces in a file and the following code displays wrong results in the number of lines. Does anyone have any i...
[4 replies] Last: Use: while getline( input, line ) { ... } Add a count to the number... (by lastchance)
StreamString Breaking???
 
Can anyone help me figure our why my stringstrem s and stringstream chunk keep breaking/not working? I've noticed that s stops working when I try to read the...
[4 replies] Last: Hello cc1234ssc, After working with the program for awhile I had some... (by Handy Andy)
need help fast
 
please explain me why this does not work and show me the correct form #include <iostream> using namespace std; int main() {int x,y,s; cout<<"x="; cin>...
[7 replies] Last: Well, sure. You could have x = 0; in it. But what's meant to happ... (by Repeater)
Simple question regarding implicit casting.
 
So i had an assignment in which i had to create namespace test in which i was supposed to create a class named point that represents a point in xy coordinate sy...
[13 replies] Last: Ok, let's see if i understood this well, basically, since i had to c... (by cdummie)
Question on quicksort
 
I would like to ask about ascending quick sort. The program goes in infinite loops when I try to stop the while loop. As an example, we have a input sort 37 2 ...
[4 replies] Last: Ah thx finally did it (by wakaka3910)
by srk100
Help Help!!!!!!!!!
 
Help Help!!!!!!!!! Question: Write a program that reads the integers in the file “flints.txt” (the integers stored in the file are the ASCII code for cha...
[no replies]
Minimum Value wont output
 
Hello, would anyone know why my code keeps outputting 0 for the min? Everything works except the minimum. #include<iostream> #include<fstream> using n...
[no replies]
November 2017 Pages: 1... 1011121314... 33
  Archived months: [oct2017] [dec2017]

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