Check istream.h its included in iostream
Type: Posts; User: Ryan_P
Check istream.h its included in iostream
Im using borland 5.01, Get() works so im not concerned with the case of the text.
Just getting this data to go back to the class.
Well Get() is working, get() however does not work.
This isnt the problem im quite sure.
Stock files below.
/////////////////////////
stock.h is included, the memory leak isnt really an issue atm, but ill add a destructor later.
Get is part of the <iostream.h> header. Not my work.
Should my stock class have some reference to...
Rest of the program works fine without this function but when its included it throws a fit.
If its of any benefit here is the whole function.
void Application::DoAddStock()
{...
Stock* newStock;
newStock= new Stock(SN,Dn,CS,US,UP,MS);
newStock->Print();
Here im declaring a pointer of type Stock called newStock. Then sending the data to the stock class and saving it...
Cheers everyone.
It turns out that it was because i didn't make DoAddStock() part of the Application class.
I am having more trouble now with another problem, but ill start a new thread for...
Get() is part of the <iostream.h> header and hence is not my work and the functions are in the same file, back to back.
void Application::DoAddPerson()
{
dMenu.getOption();
string N1;
string Nf;
string A1=" ";
string A2=" ";
string A3=" ";
string PC=" ";
TDate D;
Ive been given a project to complete, i have been supplied with basic code and a menu system and must work around this to complete the task. I do understand the concepts of the class system and I...
so if i want to store a string that is liable to have a space, and wont quit until someone presses enter, what shall i use, im not quite sure what you are trying to explain to me. i want to store...
ive included stdio.h
and this bit of code doesnt want to work,
gets(sTicket.sStreetName[iArrayCount])
im trying to get it to store a string.
any ideas?
I cannot thank you enough, and by code tags do you mean commentated code?
Thanks again......
.....and again.
Im getting a crazy error about expecting a {
Error: project.cpp(11,24):{ expected
thats in my prototype
and this
Error: project.cpp(211,13):Call to undefined function 'PrintTicket'
Ooooh just tried that im still getting errors. Ill paste in my prototype, definition and function call and see if you can spot something.
Prototype:
void PrintaTicket(struct TypeData sTicket);...
/me goes away with tail between legs
Cheers
Ive a struct TypeData, that is called sTicket, how do i pass this struct into my function, PrintTicket()
Any help appreciated.
Bah, well thats not entirely my fault, my lecturers told me i was basically doing C, in future then ill post in C++ board.
Im quite sure i was doing C. What part of it is c++?
As an asside i know i have put the function within the main there, ive moved it outside now but im still getting my extra parameter in call to addtime() error
I think the thing im not getting is how a function is defined, such as what goes in the brackets and why. And when it is called what goes in the brackets and why. These problems are only magnified...
Cheers for the help but ive still got a problem im being told i have an expression syntax which appears to be from the function call This is the code i have now. Im getting very stressed by this.
...
Ive been given a task to create a program that will create a clock that can be incremented at users request. Ive always had a few problems when functions are involvec. So far in my program i just...
Cheers ill have a look
Can someone suggest a decent book or 2 for C programming, im not a total beginner but ive been struggling with some of the tougher concepts of late, but i guess ivestill only being doing it for 2-3...