49,756 Topics

Member Avatar for
Member Avatar for iamthwee

Hi, Let's say I have a csv file like such:- [b] part,text,true,quantity [/b] [code] [COLOR="Green"]371336959,-New DDM Part-,Y,1[/COLOR] 449127604,-New DDM Part-,Y,1 808635064,-New DDM Part-,Y,2 [COLOR="Red"]189657,-New DDM Part-,Y,2[/COLOR] 319330767,-New DDM Part-,Y,1 [COLOR="Green"]371336959,-New DDM Part-,Y,1[/COLOR] [COLOR="Red"]189657,-New DDM Part-,Y,1[/COLOR] [/code] Now I want to remove duplicate parts and add the quantities together whilst PRESERVING …

Member Avatar for iamthwee
0
274
Member Avatar for Obsidian_496

Hi. I'm working on a binary tree home assignment and I have a problem. Initially my program used global variables. I decided to change that and declare variables inside functions (various reasons, you probably understand why). I want the program to run without using global variables. However, I can't figure …

Member Avatar for Obsidian_496
0
96
Member Avatar for carrythe1

Hi, I have a form application that has a number of pictureboxes. As the program runs it changes the pictures in the boxes depending on buttons pressed on the form via a function 'updateGUI'. The program runs for a limited period and eventually i get an error: An unhandled exception …

Member Avatar for carrythe1
0
1K
Member Avatar for RAVI KOTHARI

sir,can you pleaz tell me why reference over reference is not allowed?

Member Avatar for jonsca
0
34
Member Avatar for Dows

Dear all, I'm creating a set of functions to handle stl vectors. Some are useful for achieving my goals. I'm coding some other just for fun. But after some coding I see I cannot compile them propperly. One example would be a vector print function which prints all the elements …

Member Avatar for mrnutty
0
150
Member Avatar for jen5376

Im trying to make a program that generates all the verses of the song "The Twelve Days of Christmas" using recursion (its homework). Ive read what the book says several times, researched online, etc etc. Im not looking for anyone to do the homework for me...I just need some guidance. …

Member Avatar for jen5376
0
146
Member Avatar for leesho

[CODE]#include<iostream.h> //is used so it will display output to the user and that input can be read from the keyboard #include<iomanip.h> //is used so that the user can format input using namespace std; int main() { int qty1; cout << "Please enter the quantity of Televisions: "<<endl; cin >> qty1; …

Member Avatar for leesho
0
137
Member Avatar for igorg95

i'm making this spanish conjugator for class. and i cant seem to get how to make multiple letter variables. can anyone tell my what i'm doing wrong? it's kinda urgent. here is the code so far. #include <iostream> using namespace std; int main () { char verb; cout << "Enter …

Member Avatar for corby
0
162
Member Avatar for gcardonav

Hi guys: I wrote this simple code to read a series of numbers from a list and then do some simple aremathic with it. I am not certain where the error could be, I read the code upside down and still can understand where the error lies. Any help would …

Member Avatar for gcardonav
0
136
Member Avatar for igorg95

is there a way for me, using a mac to compile a c++ program to work on windows? or could some one with a windows computer compile this code and send it to me somehow?? #include <iostream> #include <string> using namespace std; int main () { char* verb = new …

Member Avatar for igorg95
0
133
Member Avatar for red999

This is a silly question. I have been working with pointers for almost two quarters and this question never occurred to me until today when I wrote up some code and my IDE screamed at me about it. Oddly enough, 99% of the time I get it right so this …

Member Avatar for Ariste
0
98
Member Avatar for sblass92

Goal is to create a simple class that can be used for GUI buttons. My question is how can I define a function variable, and then when constructing a 'button' define which function should be called when clicked. This obviously isn't right, but just to get the idea: [CODE] class …

Member Avatar for Aranarth
0
157
Member Avatar for Ayaat Monem

Hello everybody ! I want to write a program that reads from the user a number then prints it such in the Elevator if the input is 1, the output will be like that : * * * * * It seams to use an array 2D, how can I …

Member Avatar for daviddoria
0
72
Member Avatar for hogat

HI i want find record in file and null it . i find it and set file pointer with --fsetpos--befor i use --fwrite-- . all thing id correct but record not change and fwrite write record at end of file i use ftell() and fseek() but i get again this …

Member Avatar for hogat
0
76
Member Avatar for Ral78

I'm working on a program that will get a list of words from the user and rearrange it in alphabetical order. So far it works but I think it may have some memory issues because I was testing an alternative way of asking the user how many arrays will be …

Member Avatar for Ral78
0
148
Member Avatar for C#Coder

I'm trying to write a simple file output program for my class. The error I recieve when I try to compile in VS .net 2003 is the following. [I]fatal error C1083: Cannot open include file: 'fstream.h': No such file or directory[/I] The code to my program is extremely straight forward …

Member Avatar for sgtjoebear
0
2K
Member Avatar for wade2462

Okay, this just makes me feel stupid. I'm pretty good at programming for the console so I figured I would try a Win32 program. Apparently I'm stupid because I cannot even compile hello world. Heres the code I copy and pasted. [CODE] #include <windows.h> int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, …

Member Avatar for wade2462
0
341
Member Avatar for Kanoisa

Heya Thanks for taking the time to look at this, i would like some people to review my curent project which is written in c++ using visual studio 2008. Although in VS08 it does not use anything that makes it dependant on it (i dont think) i just wanted to …

Member Avatar for Kanoisa
0
163
Member Avatar for MATLAB2007

I am trying to capture keystrokes, and have been able to for all letters, and numbers, but i cant capture keystrokes such as ' ;, @, -, _, +, =' e.t.c. I have tried looking up their decimal code from the ASCII table, but that does not work. In the …

Member Avatar for avarionist
0
99
Member Avatar for Graphix

Hey everybody, I am currently having difficulty using GetOpenFileName() and GetSaveFileName(). The keeps returning the error " undefined reference to `_GetOpenFileNameA@4' ". I can't seem to find a fault in my code, so is it the compiler or is it the code? I am using CodeBlocks. [CODE]void DoFileOpen(HWND hwnd) { …

Member Avatar for Graphix
0
2K
Member Avatar for noobday

Hi, I am currently programming using c++ language and want to take advantage of some very useful wolfram mathematica functions : By that, i mean sending external datas or using symbolic calculus, applying required functions, and taking the result back in an array of my c++ program for example; I …

Member Avatar for noobday
0
88
Member Avatar for Ayaat Monem
Member Avatar for abhimanipal
0
275
Member Avatar for mimis

Hi, how can i save the text from a file in a 2d array? For example the file will be like: ebjevjhb tgbvtrjk trjgbj tgrrktgtr kgtrl tkltrg t feg ergfern gn sdcx xssw And i want to save this in a char 2d array like: char str[3][100] so str[0]="ebjevjhb tgbvtrjk …

Member Avatar for Ancient Dragon
0
118
Member Avatar for leesho

i have an assignment due for my c++ class where we have to input from the keyboard the quantity and input from the keyboard the stock price. so that it outputs as: Stock Item Quantity Unit Price Total Value ---------------------------------------------- Television 5 368.00 1840.00 Video Recorder 8 268.00 2144.00 Camera …

Member Avatar for finito
0
158
Member Avatar for hamadaahly
Member Avatar for new2programming

can anyone tell me why the timer doesn't work in my code? The game runs good but there is no timer? [CODE]//---------------- includes ---------------- #include "global.h" #include "SDL.h" #include <string> #include <cstdlib> #include <windows.h> #include <mmsystem.h> #include <stdlib.h> #include <stdio.h> #include <time.h> #include <conio.h> #pragma comment(lib, "winmm.lib") using namespace std; …

Member Avatar for daviddoria
0
240
Member Avatar for vanalex

Hello everybody! I need to move the get pointer of a text file at the beginning so i wrote in my program the following line (knowing that in a binary file really works): [code=c]ifstream in; in.open("data.txt", ios::in); in.seekg(0, ios_base::beg); [/code] but...in my text file doesn't really work. Is there a …

Member Avatar for vanalex
0
221
Member Avatar for Theanonymous

Hi this is my problem Define a class Circle that stores the center and radius of a circle, by keeping the numbers in a dynamically allocated array of doubles. Supply the "big three" memory management functions. Use this class to demonstrate (a) the difference between initialization Circle s; Circle t …

Member Avatar for Theanonymous
0
110
Member Avatar for vinsbg

pls help me with this one..everything is ok but when i add student and faculty number and then try to list them says "No added students'...:@ This is: main.cpp [code] #include <iostream> #include "Student.h" #include "Course.h" using namespace std; list<CStudent*> students; list<CCourse*> courses; CCourse* findCourse(string name) { CCourse* course = …

Member Avatar for vinsbg
0
92
Member Avatar for Sandhya212

Hi, I need to make a pairs between array elements. For eg if the sored array I have is [CODE]1 1 1 2 1 4 1 6 2 3 2 5 2 8 2 9 3 7 3 10[/CODE] then I need to pair every element of the 2nd column …

Member Avatar for Sandhya212
0
241

The End.