Beginners - November 2013 (Page 15)

Search Inside text files
 
Hello, I will ask this in advance so that I will save more time. So,I'm building a program that will ask the user to enter a product ID and the program will out...
[2 replies] Last: Maybe use a struct to hold each product. Then create an array of these... (by Chervil)
by h4ever
swap function (debugged in VS Express)
 
I tried to debug this function in Visual Studio Express 2004 http://paste.ofcode.org/EnJsc5iJ7BFmPBCP7Tg86Y I would like to understand how it works. Maybe I...
[5 replies] Last: char *r1 = strdup("world"), *r2 = strdup("Hello "); void swap(char ... (by tath)
by RabMac
Classes
 
Hi, I have just written my first class and I think it is working but no doubt I have made mistakes but as I am new to this I am not able to spot them yet. ...
[7 replies] Last: > unsigned int get_number();//accessor member function Make the acc... (by JLBorges)
by binso
Class arrays.
 
Hi. The main code of the program is not to be changed. The questions I have are that I am trying to add list1 and list2 together and put it into list 3 with o...
[6 replies] Last: Hi. I found out the problem with the bool and it all works. Thanks for... (by binso)
pipe output from command to string
 
What is the equivalent in c++ to python's subprocess module in which allows to pipe the output of a command into a string variable? proc = subprocess.Popen(com...
[2 replies] Last: thanks JLBorges (by metulburr)
initialized value to new value
 
I am trying to change an initialized value that I have to a new value, How do I do this? It's a value that I declared within a class constructor, but now I need...
[15 replies] Last: Well, I use a couple of different compilers, one is MinGW32 4.7.2 whic... (by Chervil)
Cohesive Explanation of I/O Streams Needed
 
The issue I am having is that while I am attempting to understand the basics of writing data to and from files on my computer, all of the explanations I have re...
[1 reply] : If you want to be sure the file will be opened, you could specify the ... (by Chervil)
by tkap
expression solving
 
evaluate the expression with initial values a=5, b=-5 e=a-7%b*(a+=2)+b++ also kindly explain how to go about it.
[3 replies] Last: What if there is no solution? (by Chervil)
Reading integers from .txt file help! (Practice Question Inside)
 
I am pretty new to C++, only have been self taught, and am every eager to learn as much as possible. I have been struggling with this practice problem for days...
[1 reply] : Well, in this example it might be useful to think of the ifstream as b... (by Chervil)
Error when I tried to read from a Binary file
 
Dear all, I am trying to read a binary file input.ndf which is supplied externally. The problem statement is as follows: There are neutron rays passing thro...
[no replies]
Is it possible to merge those functions into one?
 
The program run completely fine, the thing is I would like void write and void display function inside one function with least amount of code and line used. I t...
[2 replies] Last: Okay, thank you that was very detailed and helpful. (by JohnRip89)
Two questions; how do command line inputs work and how do I start working in windows applications?
 
This probably sounds incredibly stupid, but how far along woudl I need to be to start being able to put code, display graphics and text and such in the windows ...
[9 replies] Last: Sorry, I was away (I only really tend to knock about the forums betwee... (by MrHutch)
Test Scores Arrays
 
So here I have this void function, which will add the number of students that are within a specific range. The ranges are 1-50,50-100,100-200. Again, the user w...
[9 replies] Last: I see it now! Thanks for your responses shadowfiend :D (by fahmankhan75)
by Ala888
How to modify external programs
 
Is it possible to write a program where its function is to incorporate itself permanently into that of another program's ex. Prog 1 "hello world" Prog 2 ...
[2 replies] Last: Please at least point me towards its general direction. The point of t... (by Ala888)
Problem entering values into a binary search tree
 
Hey guys! I'm working on a binary search tree for class, and I'm getting stuck at the very beginning. When I try to add a value to the tree, it seems to simpl...
[no replies]
by hilft
Polymorphism question
 
Sorry, I may be asking a very stupid question. I don't know why my compiler even has an output from this code below. All I see in the main function is pointe...
[3 replies] Last: ninja'd LOL but nice explanations. verry helpful as always. thanks (by hilft)
by hilft
Upper casting problems
 
Hi, I do not understand the upper casting on the code below. Can you explain me why static_cast(a_cat) -> MakeSound(); and static_cast(a_dog) -> MakeSound(); ...
[2 replies] Last: yes i meant static_cast<Pet*>(a_cat) and static_cast<Pet*>(a_dog). S... (by hilft)
class, object, parameter
 
Please correct this and in comments there are two questions, answer please... #define test testcase_001 ; //parameter #include "testcase...
[18 replies] Last: Wait, are you saying you want to do something like #define test testc... (by long double main)
Function Definitions
 
Hello again. I'm having trouble compiling my dice Project, and I haven't been able to figure out why the functions drawDice and rollDice are throwing me LNK ...
[5 replies] Last: Rereading my post, I didn't mean to imply that removing "const" would ... (by norm b)
What is wrong with my program?
 
No matter what I do, I keep getting errors and I don't know what is wrong with it. I've been working on this for a day and it's just not happening. about to qui...
[1 reply] : you had a few problems in there. First you were trying to return a va... (by Garion)
November 2013 Pages: 1... 1314151617... 80
  Archived months: [oct2013] [dec2013]

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