C Sharp :: Coding For Quantities In Online Shopping Carts?

Jan 11, 2013

I am trying to create an on-line product store. I'm having trouble with setting up the code to correctly acknowledge quantity desired per product item in the shopping cart at check-out. I want to be able to capture multiple impressions/hits/clicks per item and increase the # in the quantity box each time someone clicks on the same item. For example, if product A is clicked 3 times, then the quantity in the shopping cart should show "3". If it's clicked 5 times, it should show "5" and so on ... However, right now, it's showing the product multiple times in the shopping cart with a quantity of "1" for each time the item was clicked. How can I correct this?

View 2 Replies


ADVERTISEMENT

C Sharp :: Copy Files From Local Computer To Online Server

Feb 10, 2015

I have a desktop application in which i want to copy files from my local computer to an online server. I have the user name and the password of the server. is there any way like

file.copy(sourcePath,destinationPath)

to copy the files where the destinationPath will be something like

"192.168.x.xx/files" ..

View 2 Replies View Related

C# :: Dinner Planner With Shopping List

Jan 28, 2014

I am new to programming, and trying to make a C# Windows Forms program, to easy our weekly dinner-planning.

I would like to make something the work like the attached Picture.

A combobox for each day, where i can select a stored dinner with recipe.

To the right it will automaticly make a shoppinglist, which I can print.

If for example i have selected 2 dinners which both needs 500 grams of meat, i should automaticly write 1000 grams of meat.

View 6 Replies View Related

C++ :: Program To Make Shopping List - One Line Per Entry

Jan 9, 2015

OK I'm making a simple program to make a shopping list. I would like the program at start up to load the previous shopping list that was saved as a text file. The format is one line per entry which consists of the category or Isle, and the item description. Here's an example:

3 Dog Food
Produce Sweet Onions

I reading the first word, and then I want to read the rest of the line which may have more than one word... the problem is my code hangs... or goes into the old infinite loop. It doesn't see the end of file.

Here is my code:

void
addItemsFromFile(vector<item> &shoppingListVector) {
string word;
char buf[30];
if (fileExists("shoppinglist.txt"))

[Code] .....

View 3 Replies View Related

C/C++ :: Program To Emulate Shopping List - File Not Reading Correctly

Jan 28, 2015

I have written an program to emulate a shopping list. Everything works fine, until I try to read in from a file. Here is my read and write code (the write code looks like it is working ok, but I figured I would include it just in case), and an example of what happens to a list that has been written, then read back in.

I took this list, and wrote it to a file, then read that file back in. The .txt file looks like everything was written out properly, but when I try to read that exact same list back in, this is what I get:

View 10 Replies View Related

C++ :: Online Shop - Serious Logical Error

Nov 15, 2013

My project is on an online shop in which you can manage a shop(adding ,deleting ,clearing and modifying items) also you can switch to different shops(all shops are same)

Code:
#include<iostream>
#include<fstream>
#include<conio.h>
#include<stdlib.h>
#include<string.h>

[Code] ....

The logical problem is serious because i am not able to find the error!!! There is some problem with display lines in void shop()-->if(mode=='s') and if(mode=='d'). I add only one item but in output screen i see two items(sometimes >2)
*note* to run the above display lines in the output screen....first register--->add atleast one item--->see your shop

View 12 Replies View Related

C++ :: Network Programming - Multiplayer Online Game

Oct 1, 2014

How to use c++ to program network for a multiplayer online game or how would i go about this?

View 5 Replies View Related

C/C++ :: Segmentation Fault On Online Judge Compiler

Sep 12, 2014

#include <string>
#include<iostream>
#include<algorithm>
#include<conio.h>
//#include<stdlib.h>
using namespace std;
int check (const char *c,len) {
char ch='a';
if(len%2!=0)

[Code] ....

View 8 Replies View Related

C++ :: Enter Value For Coding

Oct 1, 2013

some where in main:

char value;
char* sname;
sname= new char[20];
for(int i=0;i!=19;i++)
{
cin>>value;
sname[i]=value;
}

I need a stopping case when user press enter array get closed and add '' at the end but how to do that?

View 1 Replies View Related

C++ :: Program Working On Online Compiler But Not On Code Blocks

Jan 26, 2015

This program works on an online compiler but force closes on codeblocks after entering the elements.

#include<iostream>
using namespace std;
int two_print(int x, int one[999]) {
int two[999][999];
for(int k=0, r=x; k<=x; k++, r--)

[code]....

View 6 Replies View Related

C++ :: Code Reading From Online Dictionary Rather Than Offline Txt File?

Aug 14, 2014

I have a script that checks and compares two lists from an offline dictionary. Dictionary.txt which has a lot of words in it. input.txt will compare to dictionary.txt and print out anything that matches in CMD.

However, instead of using an offline dictionary is there anyway to make a code check an online dictionary? If so, would this process be slow or fast?

View 8 Replies View Related

C# :: Create Online Application Without Revealing Database Credentials

Jan 26, 2014

I want to make an online application which will connect to my database to do the stuff, but I don't want the credentials to be stored somewhere in the program or in an external file somewhere in the computer or hardcored in anyway in the code.

I think that a good solution is (but I don't know how to implement it): on program execution, the credentials will be downloaded from my website somehow in an encrypted type maybe, from an api or so.

I've not tried before to make an online application, it's the first time. But I do have knowledge of SQL and PHP and I want to try a project like this.

The technology I am going to or can use is:
* Visual C# (in Visual Studio 2010 Ultimate)
* MySQL Connector/NET
* MySQL Database on a shared host
* PHP (if needed)

View 10 Replies View Related

C++ :: Coding And Debug Time Per LOC

Mar 23, 2013

I just spent 3 hours writing and debugging 37 lines of code. Is this normal or am I "below average" in coding abilities. I come from a C background and decided to write C++ code that I finally got right as shown below for the specific example:

Code: #include <iostream>
#include <fstream>
#include <string>
#define SPACE_SEARCH 10
using namespace std;

[code].....

I think it was more the learning along the way that consumed atleast 75% of my time for this specific case. But then again, I read that programming always entails learning along the way and so its somehow no excuse for the long time taken in this specific case.

So as a matter of interest, what pace do all of you operate on, on average? i.e. LOC/day, Debugs per day or any other indicator of productivity?

View 3 Replies View Related

C :: Coding MP3 File Into A Program

Oct 16, 2013

Is there a way to put a mp3 file into a c program without having the windows media player pop up in the background each time you compile the program? I just wanted to input a few seconds of an audio file..

View 3 Replies View Related

C++ :: How To Start Coding Audio Synthesizers

Mar 20, 2013

I'm interested in learning how to write the software for audio synthesizers. a friend of mine started on the hardware side for them and, as i have no experience with this type of code.

View 7 Replies View Related

C++ :: Compound Interest Formula Coding

Sep 24, 2014

Im having problems coding this
A = P(1 + r/n)nt

//Declared test cases
float principal = 200000.00, annualInt = 0.03;
float years = 10.0;

float calcInterest1(float principal, float years, float annualInt) {
float interest1;
float nt = annualInt*12;
float A = principal+annualInt;//Accrued Amount
interest1 = (A = (principal*(1+years/100))pow(nt));// A = P(1 + r/n)nt
return interest1;
}

View 1 Replies View Related

C++ :: Check The Coding Style Use In A Program?

Apr 30, 2014

Is there any opensource tool which can check the coding style use in a program.

View 2 Replies View Related

C/C++ :: Falling Object Error When Coding

Mar 4, 2014

Write a program that computes how many feet an object falls in 1 second, 2 seconds, etc., up to 12 seconds.

1.Have a procedure called FallingDistance which has one input parameter, seconds, and one output parameter, distance.
2. Compute the distance in feet an object falls using this formula: d = ½ gt2
(where g = 32.2)
3. The main program should call FallingDistance within a loop which passes the values 1 through 12 as arguments.
4. Print a table with seconds and falling distance in feet.

Sample Output (This program has no input)

Seconds Distance
================
1 16.1000
2 64.4000
3 144.9000
4 257.6000
5 402.5000
6 579.6000
7 788.9000
8 1030.4000
9 1304.1000
10 1610
11 1948.1000
12 2318.4000

In C++, the procedure is called a function. Instead of using an output parameter, your C++ function FallingDistance should return a result of type double. This is what I created:

#include <iostream>
#include <cmath>
#include <string>
using namespace std;
const double g =32.2;
double fallingDistance(double);

[Code] ....

which gave me this error:

1>------ Build started: Project: Lab 6, Configuration: Debug Win32 ------
1> Source.cpp
1>c:usershanahdocumentsschoolprogamming ilab 6lab 6source.cpp(27): error C2065: 'fallingdistance' : undeclared identifier
1>c:usershanahdocumentsschoolprogamming ilab 6lab 6source.cpp(36): error C2065: 't' : undeclared identifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

View 4 Replies View Related

C++ :: How To Open Notepad Application Through Coding

Aug 14, 2012

I java We can be able to open any application through coding.. likewise Is it possible to open through c++?

View 3 Replies View Related

C :: Got Stuck In Simple Coding Process / How To Initialize Any Value

Mar 2, 2013

in order to calculate some logarithm approximation I need to make a variable, say s, search through the whole integer numbers.

Code:
int s;
for {;;s++){
}

[Code] ....

since the variable needs to be initialized right? how to go through all the numbers?

View 3 Replies View Related

C++ :: Coding A Loop Inside A Class To Use In Main

Feb 22, 2013

I am writing a program where all work is done in the class methods. Main is used to call the methods. I need to know how to get a loop to work without any variables in main that can be used outside the methods. This is what I have in main:

#include <iostream>
#include <string>
using namespace std;
#include "FerryBoat.h"
int main() {
//create a constructor for a ferry boat
FerryBoat myBoat('B', 20, 'A');

[Code] ....

View 3 Replies View Related

C Sharp :: Why Start From 1 Not From Zero

Jul 16, 2013

char []c =null;
c=new char[1]; 

why star from [1] not from [0]???

View 1 Replies View Related

C Sharp :: What Are Ticks And How To Use Them

May 15, 2013

I have to do a strobe moodlight lab and it says to use ticks. But I don't quite understand ticks. Do you just input it in like Ticks 1 = new Color(0,0,0); or do you have to do something do something else.

View 2 Replies View Related

C Sharp :: How To Insert Data In SQL

Apr 2, 2013

I don't know coding to Insert data in sql with C# language and I want to save data with the click event of save button

View 4 Replies View Related

C Sharp :: Use A Program To Add New Class?

Nov 30, 2012

Whether it is possible to add a new class to a program? For example: program a is my main program and I want to use program b to just add a new class to program a.

View 5 Replies View Related

C Sharp :: Get Value Cell From Datagridview

May 27, 2013

I am using C# to build up a application. Otherwise, i have two forms, the first form is frmMaterial and the second form is frmMaterialList. frmMaterial has a textbox to get value from datagridview of frmMaterialList. My code doesn't work. How to get value from datagridview of frmMaterialList into textbox of frmMaterial?

Note: frmMaterial has a button to load frmMaterialList

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved