Beginners - October 2011 (Page 12)

by gh24
Help Getting Data From txt File
 
Hi Guys, I am struggling a lot at this point and could really use some help. I have the following code that works with getting data from a text file and sto...
[4 replies] Last: When you say "master vector" what are you referring to? I mean, inst... (by shacktar)
What does a reference to a pointer store?
 
I'm a little confused about what a pointer to a reference is. How would you describe it. For example: [code int n; int* m = &n Here pointer m stores th...
[4 replies] Last: That's an excellent explanation! Thanks, really appreciate your help. ... (by waqqassheikh)
by holkey
Terminate and Read Certain Strings
 
I'm trying to figure out how to terminate within a loop so that it starts the loop over. I want the program, when reading the input file, to terminate when it r...
[9 replies] Last: OK...programming is hard enough as it is. When you're using tools with... (by mzimmers)
Weird Error: invalid initialization of non-const reference of type 'int*&' from a temporary of type 'int*'
 
Hi! I get this error on line 10 (emboldened) in the code below. I don't understand what the term 'temporary' means. I'd be really grateful if someone could expl...
[5 replies] Last: I've never seen for loops written in the way you are writing them, it... (by waqqassheikh)
writing & calling functions
 
Hi I am trying to write a function that will return true if a given whole number is perfect and otherwise false. I am not sure if I am calling the function prop...
[9 replies] Last: Okay, thanks for the reply.. (by whitenite1)
Simple questions about string...
 
Hi all, I'm new here... I am a beginner in C++, I need your helping hands in my classwork... The programme needs to use two string variables to store the in...
[4 replies] Last: Here's a simple example with 1 digit numbers to help show how to conve... (by Disch)
what does the ellipsis do?
 
hi What does the ellipsis do exactly and how can it be used? e.g. void Myfunc(int a,... );
[1 reply] : It denotes variable number of arguments. Read this http://www.cpluspl... (by tfityo)
vector class constructors
 
Yes, this is a homework problem. I need a hint. I think I'm making something more difficult than it is. I'm trying to write a vector library and am having tr...
[2 replies] Last: I'm guessing you're trying to assign "Value" to each element of "Vec",... (by Gaminic)
by hoxa
Containers and iterators (Tutorail search)
 
Hi guys, I've seen a new chapter in my schoolbook but it's 5 papers about Containers and iterators without any examples. Does someone knows a good tutori...
[4 replies] Last: Oké, thanks. Do you got a full working example maybe? (by hoxa)
link to printer
 
Well.Could Anyone teach me how to link a C++ program to printer. I am using Visual Studio 2008 currently.
[2 replies] Last: thanks a lot.... :D (by lanceTCT)
about linkedlist
 
void movePosToTail(int source); This member function moves the element in the given source position to tail • In this function deleting a node is not per...
[1 reply] : What help? (by coder777)
Question about inerithance
 
Let's suppose I have two classes, Tom and Jerry, both inerithing from a mother class Mother. Is the following piece of code correct ? Mother* m; if (x =...
[2 replies] Last: Thanks a lot Gaminic ! Now I understand this piece of code. (by cyborg68)
by gh24
Quick lpsolve question
 
Hi Guys, Hopefully this is a quicky but I am struggling to figure it out. I have code using lpsolve to solve a linear equation. Everything works great and ...
[7 replies] Last: I downloaded and compiled lpsolve 5.5.2.0. I was able to add set_int ... (by JMJAtlanta)
by Yezman
Prints numbers, but can't get rid of comma on last number
 
So here is what I have. (Note I did add a swap in for if end < start) //Requires: start > 0; end > 0; 0 <= digit <= 9 //Modifies: nothing //Effects: run...
[10 replies] Last: [quote=shacktar]I think here we'd have to have one loop to find and pr... (by Duthomhas)
by Greeny
modf function discrepany
 
Hi all, I need to separate the pre and post decimal digits from a variable of type double. I wrote the following as a test which works fine: #include ...
[1 reply] : The modf () function gave you correct results -- which you have alrea... (by Duthomhas)
by Dwigt
Please help me understand c-style strings!!
 
OK, so I am just TERRIBLE with C-style strings and I know it, so I apologize in advance. Here is my program: #include <iostream> #include <stdio.h> in...
[8 replies] Last: Where does that come from? Shouldn't it be zero since I never put any... (by coder777)
slope of a line
 
how can we calculate slope of a line whose starting and ending points are given in 2d array? float a ; the first part has the values, starting and e...
[1 reply] : The difference in the y components divided by the difference in the x ... (by Moschops)
Source file won't reflect edits
 
I've been trying to teach myself C++ in my spare time, and have learned enough to make a very simple Mad Lib type program that asks for words and then puts them...
[2 replies] Last: Bloodshed Dev-C++ strikes again. http://cplusplus.com/articles/36vU7k9... (by Moschops)
Pallete packing optimization
 
Dear all, a standard European pallete has a size of 120 x 80 cm (for transporting goods). I am trying to program a solution which tells me how to put a ma...
[1 reply] : You have to consider the x and y direction separately. The basic math ... (by coder777)
Printing a specific part of text file into an output file? VERY confused!
 
Let's say I have an input file "inputF." In this file we have: I 2 3 4 5 2 W 3 40 0 3 1 2 3 D 4 59 3 2 9 94 94 220 P 0 0 0 2 1 3 6 Q 3 4 2 U 9 3 2 3 R 9 3 2...
[2 replies] Last: This are the steps how to do it: 1. Open the file http://www.cplusplu... (by coder777)
October 2011 Pages: 1... 1011121314... 59
  Archived months: [sep2011] [nov2011]

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