Beginners - February 2015 (Page 18)

Protected Base Destructor
 
Hello I want to create a derived object that can decide weather or not it gets deleted. this is what I tried, and it works, but it shows a warning: warning: ...
[2 replies] Last: OK thanks didn't think of that. (by closed account oGhfSL3A)
Reading from file and storing into array
 
I am completely lost and have been trying for hours to read from a file named "movies.txt" and storing the info from it into arrays, because it has semicolons. ...
[1 reply] : Try making your file look like this The Avengers 2012 89 623357910... (by TarikNeaj)
best
 
im saving the position of the character so i can track it anytime without calling the function, that loops the whole map to track the character, again and again...
[1 reply] : Im not 100% Sure, but one thing is sure, Your class name should always... (by TarikNeaj)
Define and save variables in another file
 
Hello I need to be able to do this; I've got two files: A: The file which configure variables in B. A always stays on same PC. B: This file should be able ...
[4 replies] Last: Kind of yeah. But when I share my application (A), so that other use... (by Nielyboyken)
reading and using Comma Separated Values
 
I have a csv file and want to read and use the data. So far I've been able to load the data into my program and put it into vectors although currently my progra...
[no replies]
Does my header look alright?
 
This is only the second time I've made a header for my code, but last time my code was just a bunch of functions. This time, these functions are in a class. I j...
[3 replies] Last: That header as you've got it doesn't do anything for you. You've decla... (by tipaye)
Problem holding values for X and Y - Linear Regression Problem
 
I'm working on a program to calculate linear regression of N inputs. I need to hold values for X and Y when I prompt the user to input values for X and Y. The p...
[2 replies] Last: Starting from the top: Globals are bad enough, but globals named n, m... (by tipaye)
Question
 
Hi, Please discuss what are the advantages of insertion and extraction operator overloading ? Thanks.
[2 replies] Last: Yes (by BillyBob)
input stream problem
 
Hi, im reading B.Stroustrup's book : Programming principles and practice using C++ . Im doing every single exercise and so far i have done them all. But now i s...
[2 replies] Last: Thanks man a lot :) (by etrusks)
Program keeps aborting (vectors)
 
So basically my program keeps aborting because subscript is out of range. What I am trying to do is get numbers from a file using vectors. It only aborts when ...
[2 replies] Last: As with an array, a vector's first element is at index 0. So, if you ... (by cire)
Please Help! I need a peer review :(
 
Hello, I'm currently in C++ 101 at school and I need a peer review for my assignment by midnight tonight. I am taking this class online and there are no student...
[3 replies] Last: thanks a lot, this helps. i'll make those changes! (by Billgonzo)
Payroll Assignment: Program 'forgets' previous information entered despite having an assigned variable
 
Hey. I'm a programming student and I'm in a bit of a mess. I'm not at the best of colleges and they basically smashed every programming/coding class into one (i...
[1 reply] : Include the text files payroll8.txt and payroll10.txt, and I will take... (by Militie)
computing wages
 
Write your question here. ok so when i do the calculation at line 24 (last line) to get the wages, when i compile it it doesnt give me a proper pay like $450.0...
[5 replies] Last: still does the same that gives me super long exponential answer...i ju... (by synalprasad)
Program that prints out all digits of an integer not working (1,2,3)
 
Title. Even more bizzarely, it prints something different every time it's run. #include <iostream> #include <iomanip> #include <cmath> using namespace ...
[42 replies] Last: Update: It still doesn't work, but I have updated my code. It now has ... (by keltonfan2)
by omoe
How to convert this Pascal loop to c++?
 
I'm having hard time understanding the loop below , I understand it is used to encrypt strings , But i was wondering about the inc(k) instructions , If the buff...
[4 replies] Last: Oh right i'm sorry , , I figured it out after doing some research , lo... (by omoe)
Help making a reciept
 
This program is not finished. I'm trying to make a receipt program for class that will allow the user to choose three different items. If the user selects at le...
[no replies]
by Fedeb
2d arrays (reloaded)
 
Ive read a recent post about 2d array and i decided to try it myself. The code writes 2d arrays using different methods and although is working as expected i wa...
[3 replies] Last: 1) Dynamic dims (or dynamic memory alloc.) is usefull if your program... (by Disch)
Loop issue
 
Hello everybody, I've just started my adventure with C++. I have a problem with this bit of code: #include <iostream> using namespace std; int main() { ...
[7 replies] Last: Works like a charm, buddy. Thanks! (by MultiDaxio)
Access elements in matrix when it is called from a function
 
Write your question here. Hi, I am having problems with this line for (int &vecino: lista_vecinos ). I want to go ever each element in "hormiga" column fro...
[1 reply] : The range-based for cannot know the actual size of the array that the ... (by keskiverto)
What exactly does "if (!cin)" mean?
 
I'm having trouble understanding what condition if (!cin) is testing here. I'm sure it comes down to my limited understanding of what is happening with function...
[8 replies] Last: Oh, I actually didn't know that. But, at the very least, the next inpu... (by LB)
February 2015 Pages: 1... 1617181920... 52
  Archived months: [jan2015] [mar2015]

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