I am working on my term project and I need help. there are some parts of it I couldnt do. the question is:
---------------
1. Write a program to create a stock for the products of a company. The following details should be stored in the system
a. Name of the product
b. Number of items available
c. Unit price
The program should let the user to look for a product using its name. Also it should be possible to update the number of items available. The program should store the data in a file for later use. On running the program the data from the file will be loaded into the memory
-------------
And I tried to solve it with examples in my course book . this is what I did so far. I am having difficulties about case 2.I messed up at case 2.If you see something wrong about my solution plaese help me.my english is not good. I hope you understand me.My solution so far:
---------------------------- Removed code per Posting Guidelines 8 1436
HI,
You have mised a break statement in case 2:
Modify it like this -
case '2':
-
printf(" enter product name:");
-
scanf("%s", searchname);
-
-
break;
-
-
I pesume that this isthe only problem you are facing.
Raghuram
HI,
You have mised a break statement in case 2:
Modify it like this -
case '2':
-
printf(" enter product name:");
-
scanf("%s", searchname);
-
-
break;
-
-
I pesume that this isthe only problem you are facing.
Raghuram
thnk you very much.I fixed that part. but there are lots of problems in my solution. :( anyone can help me?
thnk you very much.I fixed that part. but there are lots of problems in my solution. :( anyone can help me?
If u can post the errors here, it would be lot faster
Hi bttf,
There are so many things wrong with this. It is just syntacticly wrong. That you say it should work leads me to believe that you didn't write it.
Also please see our Posting Guidelines located at the top of the C/C++ Forum. You are not to post your entire code for assignments.
We at TSDN are happy to help, but you must also do your part. If you are having trouble with the syntax, say so. If you are having trouble with a section of code, show that section.
Good luck. Hope that we can help you in your programme.
Adrian
If u can post the errors here, it would be lot faster
Is there any major problems with my unfinished solution.?
I am beginner at C and I have to say I am not good at it. I use DEVC++ some of errrors are :
--line 10.. two or more data types in declaration of `menuStock'
--line 32 conflicting types for 'printf'
--line 42 [Warning] data definition has no type or storage class
--line 32 a parameter list with an ellipsis can't match an empty parameter name list declaration
and there are some syntax errors :( am I solving this question in a wrong way?
Is there any major problems with my unfinished solution.?
I am beginner at C and I have to say I am not good at it. I use DEVC++ some of errrors are :
--line 10.. two or more data types in declaration of `menuStock'
--line 32 conflicting types for 'printf'
--line 42 [Warning] data definition has no type or storage class
--line 32 a parameter list with an ellipsis can't match an empty parameter name list declaration
and there are some syntax errors :( am I solving this question in a wrong way?
Do you understand the syntax of C?
Adrian
Do you understand the syntax of C?
Adrian
I dont know that much about C :( I am having difficulties in Structures subject
I dont know that much about C :( I am having difficulties in Structures subject
Oh boy. Not that I don't want to help you but it is a course in itself to teach C (or any language). Do you have any programming experence? Without some, I will have to point you at searching for a C tutorial online (go to your favorite search engine and search for "C Tutorial") so that we have a comon ground to talk on.
Let me know.
Adrian
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Aaron Toponce |
last post by:
My goal is to share my VS.NET 2003 ASP.NET web application project files to
my FTP server, so that my parter may copy the files and also work on the
project, then repost them to my FTP site. That...
|
by: FGMer |
last post by:
I am in a desparate situation and I need help.
I have two servers one for the SQL DB and another for the ASP.Net code. I
currently use my desktop to connect to the Application code and then edit...
|
by: Vyacheslav Lanovets |
last post by:
Hello, All!
Installed VS 2005... What is annoying is that project files are not backward
compatible.
For instance, EVC4 vcp files are backward compatible with EVC3 and can be
used...
|
by: Dave |
last post by:
Does anyone know of a Windows compatible command line tool that capable
of parsing Microsoft's VC++ workspace/project (e.g., .dsw, .dsp, .sln,
..vcproj, etc.) files and generating an...
|
by: KevinGPO |
last post by:
Just wondering if anyone knows if there are converters to convert from:
MS Visual C++ 6.0 or
MS Visual Studio 2003
project files into UNIX autogen/configure/make files?
|
by: Raterus |
last post by:
Hi, I'm after this setup, and I'm just wondering if this is even feasible.
I'd like to store my asp.net project remotely, on a network drive (all the project files, everything), But I want to be...
|
by: msnews.microsoft.com |
last post by:
Why are there multiple project files for one project? There's one that seems
to be stored in documents and settings (windows xp) and like 2 in the
project itself. It doesn't seem to affect...
|
by: Emmanuel |
last post by:
Hi,
I am using VS 2003 to build my (csharp) solution.
1. Is there a way to reveal the command line options that VS is using during
compilation of a project file, in order to build a batch...
|
by: Chris Peeters |
last post by:
Hi,
When creating an ASP.NET project in VS2005 : where are the project files
(.csproj, .sln, ...) ?
The only files I can find are the aspx and .code behind-files.
thanks
Chris
*** Sent...
|
by: kelceycoe |
last post by:
I know how to play a single sound, but I need code that will play any unset number of sounds at random intervals, and at random times. Also, I need to know how to embed these sounds and other project...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| | |