#pragma once
#include "product.h"
class DataStore
{
public:
unsigned int findPrice(int id, Product dataStore[], int size);
Type: Posts; User: Swadesh
#pragma once
#include "product.h"
class DataStore
{
public:
unsigned int findPrice(int id, Product dataStore[], int size);
@ whileflags: Thanks for this, now I can follow the thread you gave to see the corrections.
Thanks again
Thanks, That solved it.
However, "Alex Allain" in his C++ book wrote the following code without the declaration you mentioned.
I guess he made mistake.
#include <iostream>
#include <string>
using namespace std;
int main()
{
int x;
int p_x = & x;
I am using Visual Studio 2010, can you tell me how I can use the C++11 features?
Error 1 error C2552: 'data' : non-aggregates cannot be initialized with initializer list c:\users\swadesh\c++ programs\pointerz\pointerz\pointerz.cpp 6
Error 2 error C2143: syntax error : missing...
Hey, the following code you gave me is not executing, is giving errors.
How would I display the results in a bar graph way?
Currently it does, depending on the count:
*
*
*
*
*
The program seems to work fine with negative numbers,
while(choice < 1 || choice > 3);
Doesn't this take care of it?
Thanks for all the replies :)
Here's How I came about it, its also revised code with help from: Matticus
#include <iostream>#include <string>
using namespace std;
int main( )
{
int choice = 0;
Problem:
#include <iostream>#include <string>
using namespace std;
int main( )
{
This Is How I managed To Solve.
#include <iostream>#include <string>
using namespace std;
int main()
So I want to create step/waterfall type effect using string.
I have managed to draw a single step. However, everytime the program loops I want it to increase the size of the step.
ie:
*...
Hey, actually I was following what you said..
Is this legal:
char outFileName[10]; // Variable that stores the filename user wants
cout << "Set the output file name: ";
...
Here's the new code file
#include <iostream>#include <fstream>
#include <string.h>
using namespace std;
int main()
Hey, Currently I making a little program that takes: Clients name and then the tracking code for that client and saves it in a 'char array'
However, my following code is not producing a file:
...
Hey manasij7479
The first method you said works well, doesnt matter if I am getting line or using the >> operators
Thanks
Could you elaborate more please.., am quiet a noob
Thanks
what if I am storing file contents in such way... How would I do it then:
while (!fakeans.eof())
{
for (int i=0; i<MAXQUES; i++)
{
fakeans >>...
Brief history about me.
Hey, Kind of Noob and started programming recently.
My situation
I have file that has content written as:
25_Cents 15_Cents 40_Cents
14_Inches 6_Inches 18_Inches
^ Hey, Thanks that seemed to grab the line..
Thanks Again..
Brief history about me.
Hey, Kind of Noob and started programming recently.
My situation
I have a Text file that contain 7 questions and I want to read those questions from a text file, full...