Beginners - April 2016 (Page 2)

Leading zeros not working in an output file
 
So I'm writing a program that involves reading military time (hh:mm:ss) and I can't for the life of me figure out why I can't get the leading zeros to work when...
[1 reply] : Nevermind, found the error. It was set to left justified from one of t... (by fukusdm)
File Input Output Streams
 
I am trying to get this program to take information from a text file and input it into the list at the very beginning. At the end of it I am trying to make it o...
[no replies]
Need help storing character values into a 2D array
 
So I am almost finished with this program, and I need to take a set of int values from a previous array, go through each value, determine if the value is >= 128...
[2 replies] Last: Wow thanks so much! It fixed it! (by costadali)
Confused about class
 
I'm running into problems writing a program that uses class and other functions. Everything appears fine until the the very end, and I get the error message "to...
[5 replies] Last: You should do something like this: d1.showDate1(30, 4, 2016); then ... (by jgg2002)
Problem with my while loop
 
Hey guys and Gals, My first time asking for help like this but I see you guys are very helpful so I will give it a shot. So I have a simple program for a cl...
[3 replies] Last: On line 27 you do: char play = 'A'; Then on line 35, you put the f... (by jgg2002)
incorrect Output?
 
Everything seems to be working, except the final output. Can someone help find my issue somewhere please? #include <iostream> #include <string> using names...
[2 replies] Last: Use code tags when posting code. Edit your post. As for your problem,... (by jgg2002)
Need help applying Roberts Cross operator to 2D Array
 
Hey guys Im using a txt file to store values onto array intImage , and I want to take that array and run it through the Roberts Cross operator: (rc = (| i...
[2 replies] Last: Oh I just solved it but thank you anyway. (by costadali)
CONVERTING STRUCTURES TO CLASS
 
I had this question for class: A student has established the following monthly budget: Housing 500.00 Utilities 150.00 Household Expenses 65.00 Transport...
[no replies]
String.at() not seem to be working?
 
I'm trying to find a char in a string but the loop never executes for(int a = 3; a < line.length(); a++){ if(line.at(a) == 'g'){ //do something ...
[4 replies] Last: Ok, I guess I should add that I have the for loop inside if(inFile){... (by mistersunnyd)
Output is just a little off
 
I've been trying to troubleshoot one of my functions and during my output I get some letters in between my words. I am using a file and the first line reads: ...
[1 reply] : > during my output I get some letters in between my words. perhaps you... (by ne555)
I need solution for string subject inc++
 
hi .. may I have the answer of thie question .. Q: declare four variables of string types bu using c string library,then apply and practice on all string sta...
[5 replies] Last: cin and cout - see Basic Input/Output in the tutorial: http://www.cpl... (by Chervil)
Visual Studio problem
 
Hello, I understand this may be very simply for moSt, but I'm trying to create a window form that has a button that when I click it. It populates Hello World ...
[3 replies] Last: The main function should be located in one of the .cpp files. (by Thomas1965)
I need help in making a hollow parallelogram
 
I want this; ********** * * * * ********** So far, I got this; #include <iostream> using namespace std; int main() { int lines = 0 ,...
[no replies]
Files
 
I don't know how to retrieve files for 2D arrays. Help is really appreciated. Write a program that creates a two-dimensional array, reads data from file nu...
[2 replies] Last: What code have you done so far? Since there is no code to help you wit... (by chicofeo)
Change C++ to files
 
I have the following question for a class: Write a program that asks the user for a positive integer no greater than 15. The program should then store a square...
[1 reply] : You already did most of the work. Now instead of doing I/O to the con... (by closed account E0p9LyTq)
Issues with vector and class
 
Hope all is well. I believe my class statement is done correctly, the private, the public, the get and set parts. I don't know if why my nested if statement is ...
[2 replies] Last: Thank Peter 87. I need to pay more attention to detail. Helps out with... (by dvaz1990)
Button fix C++
 
I'm having a small problem with my button. I have the main done, but I am not able to figure out how to convert this code from VB. The ClickCount is the problem...
[no replies]
Help using atoi with arrays
 
Having a problem with this code where I have to extract a string of the format (x^4+3x^3+6)+(2x^5- 4x^3+8) from a file and add (or subtract/multiply) the two po...
[1 reply] : Problem is with this section of the code: int** getPolynomial(strin... (by Hatches)
Clean a polluted file. Unexpected results
 
Hi. I have a text file that have been polluted with strange characters like Æ’à and codes like '\0' '\x1' '\x19' by another application. I've ...
[2 replies] Last: Nope. Same behavior. This must have something to do with file encoding... (by tonkadan)
Needed Objectives and Learning outcome
 
Write your question here.
[1 reply] : What does this have to do with C++? What does this question even mean... (by MikeyBoy)
April 2016 Pages: 1234... 43
  Archived months: [mar2016] [may2016]

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