49,761 Topics

Member Avatar for
Member Avatar for Clockowl

Hi guys, What am I doing wrong here? Program dies on me @ merge(). :( [code=cpp]#include <iostream> #include <vector> using namespace std; int main() { int afrom[4] = {0,0,1,2}; int ato[4] = {1,2,3,4}; vector<int> from(&afrom[0], &afrom[4]); vector<int> to(&ato[0], &ato[4]); vector<int> length; vector<int> all_nodes; sort(from.begin(), from.end()); sort(to.begin(), to.end()); merge(from.begin(), from.end(), to.begin(), …

Member Avatar for Clockowl
0
120
Member Avatar for smitem03

// [code=cplusplus] #include <stdio.h> int main (void) {int currentornew; /*This is where if the user inputs a 0 they will automatically be brought to insert hours for employees.*/ int newemployee; /*This is where if the user inputs a 1 they will autmatically be taken to information of adding a new …

Member Avatar for jephthah
0
99
Member Avatar for DaveD3

I am new to .NET and have been unable to get data from a CSV file to a dataset. Most examples are VB and C# which need to be converted. The code below compiles clean but does not fill the dataset. I have been unable to set a watch on …

0
59
Member Avatar for bkeenom

I am working a program that imports functions from a file, and stores them as Polynomial objects in a linked list. I have been given a linked list class already built. But i have to make a Database class that performs other operations. I am stuck on one that requires …

Member Avatar for bkeenom
0
127
Member Avatar for fearsneachta

Hello everybody, I'm having a problem with my conpiler. Below is what I typed but it is giving me Can anybody help me? 7 parse error before `float' 10 `fltMoney' undeclared (first use this function) 10 (Each undeclared identifier is reported only once for each function it appears in.) 13 …

Member Avatar for fearsneachta
0
110
Member Avatar for xVent

Hello guys , i recently started programming in C++ , and i am trying to create a text-based RPG in prompt console ... what my problem is that i have my main function , calling one other function name infomisc , in infomisc function it let you choose , 1. …

Member Avatar for Nick Evan
0
132
Member Avatar for KarthikOnIT

Hi Friends, I have a requirement like in a CPropertySheet i need add four property pages, in that first two pages should contain Wizard mode property of CPropertySheet & the next two pages should behave like a normal mode. The current problem is that if i call 'objPropertySheet.SetWizardMode()' before 'objPropertysheet.domodal()', …

Member Avatar for MrSpigot
0
97
Member Avatar for Bladtman242

Heres the code, im pretty sure i missed something really stupid, No matter what number i type i get "The number oyu type must be a positive number" so i guess the problem is either in my if statements in main or in the checkuserinput function, most likely in my …

Member Avatar for Bladtman242
2
205
Member Avatar for pczafer

hi eveyone i need to edit person name or Appointmendescription but not date or time in my program. i can write all the records to the file and can read from the file. and need to edit the file now. can anyone help???? thanks.. [CODE] void writeAppointmenRecords( ) { int …

Member Avatar for Sky Diploma
0
97
Member Avatar for timmy123

I have a hole host of questions about this but i don't have a clue as to how to do them ... here is one .. im hoping to see exactly how its done so that i can do the rest.. thanks Execute the following sequence of operations on an …

Member Avatar for ArkM
0
177
Member Avatar for ihatehumans

As part of an assignment I am creating a class to handle rationals with numerators and denominators, overloading the operators for cin and cout, as well as +-*/. So these are the functions for those operators, now where exactly should I include these in my class? [code] Rational addition(Rational a, …

Member Avatar for siddhant3s
0
203
Member Avatar for Curtain51

Been working on this project for the past two days and tried googling for solutions and about every 5th solution led me here, so I decided to join and see if I could get my question answered. Here's what I need to do, this is a semester long project for …

Member Avatar for Curtain51
0
187
Member Avatar for ShadowScripter

Bah, once again I am beat by the computer logic... Anyone have an answer as to why it gives me an error: "Expected a constant expression at msg" Here's the code, [CODE] const int INFOWND_SIZE = 4; int msg_length[] = "Message"; double calc_amount = (double)msg_length/(double)INFOWND_SIZE; int msg_amount = (int)ceil(calc_amount); char …

Member Avatar for ShadowScripter
0
704
Member Avatar for 123qwerty123

For the most parts I believe my program is correct, when compiled it doesn't show any errors. The problem that I do have is that I cannot the information on my linked list to print. When the print out comes out it's suppose to show a list of names instead …

Member Avatar for r.stiltskin
0
80
Member Avatar for orwa

I need an example on downloading an internet file in a windows service application before logon using c++.

Member Avatar for MosaicFuneral
0
180
Member Avatar for yazooney

hey, I want to read internet data through a C++ program. I am told that the way to do this is by using a proxy server and spitting out the data through the proxy to a file which then can be read. How exactly do you setup a proxy server …

Member Avatar for jen140
0
903
Member Avatar for massivefermion

Hi pals I have three qestions 1-Is it possible to overload {} operator? 2-What is the benefit of using function objects other than functions? 3-How can i access CPU serial number and such a things?

Member Avatar for MosaicFuneral
0
111
Member Avatar for kelechi96

The title says it all i want to make 1 file which can store information which my C++ program can read and use. How do I go about doing this.

Member Avatar for jen140
0
13K
Member Avatar for jaepi

Hello there. What is usually the reason of getting an undefined reference error? I have already included the [B]pthread.h[/B] header file yet I'm still getting the undefined reference error for the [B]pthread_create() [/B]function. *sigh*. I'm using makefile in compiling my code. Is there someone here who could enlighten me? Thanks! …

Member Avatar for Kjah_C++
0
145
Member Avatar for Usura

Hey, im trying to delete an element of an array of pointers of a class, how can i delete just a single element? my code is basically this... n =8; ClassName *newName; newName = new ClassName[n]; how would i delete for example, element 3, while being in that element... if …

Member Avatar for tux4life
0
79
Member Avatar for kootech

Hey I'm just starting to learn how to program and right now I am making a C++ tool with a Command line interface in Xcode 3 and this is my code. [code=cplusplus] #include <iostream> using namespace std; int main() { //declare input output variable double base=0.0; double height=0.0; double area=0.0; …

Member Avatar for kootech
0
154
Member Avatar for iaaan

Hey all. Im working on a project that manipulates Wav files such as being able to add an echo to it and so on. So far ive managed to read in the Wav, split it up into the header file and data and manipulate the data by adding an echo …

Member Avatar for MHC
0
463
Member Avatar for kiwihaha

My main code variable declaration (just declaration no login statement) [CODE]struct AXEMAN{ int lvl; int att; int hp;}; struct DEFENDER{ int lvl; int att; int hp;}; struct ARCHER{ int lvl; int att; int hp;}; struct SPEARMAN{ int lvl; int att; int hp;}; struct ROUGE{ int lvl; int att; int hp;}; …

Member Avatar for tux4life
0
171
Member Avatar for mostafanageeb

Assume you have a hard disk with the following specs: • Has 4 platters • Has 4096 tracks per platter surface • Has 512 sectors per track • Has 256 bytes per sector • Rotates at 8,00 rpm • Average seek time: 4 msec Write a program that roughly simulates …

Member Avatar for tux4life
-1
97
Member Avatar for SmokyMo

i am new to c++ and wonder about how i create a file for example string flight; cin>>flight; flight=flight+".txt"; ofstream myfile; myfile.open(flight); instead of having a fixed name like myfile.open("file.txt") but it doesnt work , are there elegant solutions to this problem i have. all the help is appreciated.

Member Avatar for tux4life
0
87
Member Avatar for bkeenom

I need to be able to get rid of spaces in a string. All strings are representations of functions: 3 * x ( 1 ) + 1 * x ( 3 ) + 6 * x ( 2 ) – 10 * X ( 0 ) and i have to …

Member Avatar for bkeenom
0
78
Member Avatar for gretty

Hello In my program, the function [B]largest_prime_factor[/B] is not being called/working? Can you tell me what may be wrong? The function [B]largest_prime_factor[/B], should return the largest prime number of the variable [B]n5[/B] (n5 = n3 + n4). Plus if you see any other errors or maybe a better way of …

Member Avatar for r.stiltskin
0
188
Member Avatar for 123qwerty123

I'm trying to store a list of names in alphabetical order, while implementing this linked list, but I've bumped into some errors. This is what I have: Node.h class node {public: node(node* , node* , node* , node* , node* , node* , node* , node* , node* , node*); …

Member Avatar for tux4life
0
962
Member Avatar for jimjimjimz

Hi, I have built a text based adventure game. The last thing I have to do (this is for an assignment), is ask the user if they want to play again. So, I thought the code below would probably be the best way to do it, seeing as I don't …

Member Avatar for jimjimjimz
0
133
Member Avatar for kelechi96

Ok I need to know how to set my class to read only the values after the = sign. Here's my class so far. [CODE] #include <iostream> #include <string> #include <fstream> using namespace std; class Config { int pos; string search; public: char * confname; void configsearch () { fstream …

Member Avatar for kelechi96
0
167

The End.