49,761 Topics

Member Avatar for
Member Avatar for ronicasingh

Hi all professionals, I am just an amateur compared to most of you. I am contemplating starting an extremely lengthy program, just for my own purpose, which basically does a holiday reservation to whichever and whatever place in SA, for now. I am just thinking this idea for building up …

Member Avatar for jencas
0
101
Member Avatar for acardiac

I have written this program and i am facing problems in the SearchRec() and DelRec() function.....SearchRec() function is supposed to search for a record on the basis of the pptno provided and if found would return 1 else it would return 0(but it is no working).And the DelRec() function should …

Member Avatar for Ancient Dragon
0
236
Member Avatar for Dendei

hi i got an problem about reading my files i want to decide which file to open in the program not before anyone now a solution? :) [CODE] string fil; cout<<"which file? : "; cin>>fil; ifstream myfile(fil); [/CODE] cant see why this dont work...

Member Avatar for Dendei
0
96
Member Avatar for meistrizy

Thanks in advance for your help. I am supposed to create a program that allows user input for a code. The program will then read the array and output the letter on the keyboard one character to the left of the inputted strings. I am first trying to get the …

Member Avatar for meistrizy
0
164
Member Avatar for AnGuRuSO

This is pretty damn embarassing, I've been programming for a really long time and have been defeated by a trivial problem. [code] #include "stdafx.h" #include <string> #include <iostream> #include <stdio.h> using namespace std; int main() { int choice = 0; string itemDesc; double itemPrice; cout << "1. Process a sale" …

Member Avatar for AnGuRuSO
0
123
Member Avatar for nirav bhatt

[CODE] #include <cstdlib> #include <iostream> #include <string> #include <math.h> #include "utils.h" #include <float.h> #include "onboostnn.h" //using namespace std; /* Constructor function. This sets the training example file and number of base models. It also sets to NULL other variables to be used later. */ onboostnn::onboostnn(datafile* examples_to_train, long new_num_base_models, int new_num_epochs, …

Member Avatar for ArkM
0
119
Member Avatar for pri_skit

In RequestDeviceNotifications to detect USB Device, i am using FSD_MOUNT_GUID option to get two drives present on system namely: 1. \Disk (COMPACT FLASH TRAY) 2. \USBDisk(USB Device) both of them are removable drives i.e one is FLASH TRAY which contain (.bin files) for Window CE and other is USB Device. …

0
81
Member Avatar for jdm

I'm working on a password program for fun. If the password is correct launch something. If password is wrong prompt again. After 5 wrong guess don't allow the user to try and guess again, but allow them to get to the regular parts of the code. For example. If they …

Member Avatar for jdm
0
94
Member Avatar for darked90

hi, i tried to create a program that takes in 8 inputs in an array, then grade the user and see if they passed or not (6 out of 8 or higher is a pass), but my program always tells me that i passed even if i get 0. other …

Member Avatar for darked90
1
297
Member Avatar for thingstealer

hi everyone, i'm having trouble initializing a private int in a class and can't figure out what's wrong. it's especially confusing me because i do nothing different with my int called size from with my int called HeapSize, but size won't compile. the error i get is: "error: invalid use …

Member Avatar for thingstealer
0
146
Member Avatar for yang120

HI, im trying to write a quiz program, i don't understand why is my first part is not right...help plz!! # include <iostream> # include <cmath> using namespace std; int main() { char answer[8] = {'A', 'C', 'D', 'B', 'A', 'B', 'A', 'B'}; char input[8]; int correct=0, incorrect=0, position=0; for …

Member Avatar for yang120
0
150
Member Avatar for FTProtocol

Just wondering if theres a function to get the window title of your browser. Like if you were to visit [url]www.myspace.com[/url] your window title would be: [url]www.myspace.com[/url] - Mozilla Firefox or w/e browser you happen to use. Is there a way to get the title of a window?

Member Avatar for fskreuz
0
1K
Member Avatar for qajaq49

I'm writing a C++ program to use a MySQL database (which means I'm limited to the <string.h> include file because of usages in the <mysql.h> include file). In one function, the user will enter a 9-character string that will be stored in an array (AcctNum[10], to allow for the terminating …

Member Avatar for qajaq49
0
12K
Member Avatar for jeevsmyd

Hello friends.. I am an amateur programmer in TURBO C++ .. It is a very old version v3.0 ... I am beginner.. I wrote a very simple programme to find the largest ans smallest element in an array . . The largest element finding process is working finely .. I …

Member Avatar for seanhunt
0
400
Member Avatar for guest7

Hi, I am trying to read number from file. Following is my code. I am not able to read it correctly. When i>1 then i should read the second and third line of the file and store the values in the vector rows. But it is not reading the second …

Member Avatar for daviddoria
1
128
Member Avatar for Avaviel

I'm having trouble with a school project. This project runs on commands inputted though the terminal. The problem I'm having is that when I type in the commands: "+a +b +c +d" (insert a, b, c, d) the program breaks at inserting b... so somewhere in the insert command it …

Member Avatar for StuXYZ
0
81
Member Avatar for sweetApple

I am creating a program that involves a simple agent navigating a grid world to discover food. I am having trouble creating a unique class for the agent (which contains data members that represent its perception of the world - direction of the smell of the food, a visual 5x7 …

Member Avatar for sweetApple
1
137
Member Avatar for Yaserk88

Alright, I have a loop with a few nested loops inside like so: ........ for (int s=0; s<200; s++) { for (int i=0; i<N_plates; i++) { for (int j=0; j<3; j++) { V=V+(Cen[i][j])*(N[i][j]); } for (int j=0; j<3; j++) { ................ } } V=V/6; cout << "Volume:" << V << …

Member Avatar for vmanes
0
98
Member Avatar for lesodk

Hi, i want to read some lines to an output text file in a loop. My problem is, that i want to start clearing the text file and then append to it in a loop. At the moment i use: ofstream file; file.clear(); file.open("book.txt", ios::app); for (map<string,Person>::const_iterator it = adrbook.begin(); …

Member Avatar for MosaicFuneral
0
241
Member Avatar for jonathanasdf

Yeah. This was what I was wondering. Because I am initializing arrays using the new function, I was wondering if there was any way that I could catch a force close (clicking the X or using end task) so I could delete [] the array. Or maybe the array is …

Member Avatar for fskreuz
0
131
Member Avatar for southernd0529

[code=cplusplus] #include <iostream> using namespace std; int main() { const double WEEKS=5; const double TAXES=.14; const double CLOTHINGEXPENSES=.10; const double SUPPLIESEXPENSES=.01; const double SAVINGSBONDS=.25; const double PSAVINGSBONDS=.50; //Declaration Section double hours, rate, taxes, grosspay, netincome, clothingexpenses; double remainingbalance, savingsbonds, psavingsbonds, suppliesexpenses; double finaltotal; //Input Section cout<<fixed<<showpoint; cout.precision(2); //sets the 'double' …

Member Avatar for southernd0529
0
129
Member Avatar for ARYT

I’m actually going crazy. After spending a lot of time working on Decision making (if-else, switch and …), I really cannot figure out the basic difference between iteration and decision making. In some problems, the tutor asks us to use “While” loop and “break”, instead of “if-else” and it makes …

Member Avatar for r.stiltskin
0
277
Member Avatar for number87

So basically I am creating a client/server kind of program. The client/user enters a question eg "Who are you? " The server part receives this and checks it with a txt file and returns eg "I am a computer" or "Answer not found" So when i compile and run my …

Member Avatar for Comatose
0
352
Member Avatar for selvaganapathy

Hi, I am using VC++6, MFC Application I am having the member variable - CArray < Coordinates, Coordinates & > mCoordinates. Coordinates is a structure, contains x, y, and z. When i return reference to this object, there is no problem. but When i assign to some reference i get …

Member Avatar for selvaganapathy
0
144
Member Avatar for crewxp

I had 2 assignment that were due tonight and I completed both of them in Visual Studio, but we're required to make sure they compile in linux before submitting them. I'm getting undefined reference errors when trying to compile Assignment3. Assignment2 consisted of marble.h and marble.cpp, runs fine. Assignment3 #included …

Member Avatar for crewxp
0
135
Member Avatar for rastaberry

hello, I want to read lines into an array (I will later work with the array of pointer , so that is why I use it) well this is my code that doesn't work correctly, does anybody now why? I created a simple txt document for this which has only …

Member Avatar for rastaberry
0
106
Member Avatar for Georges5

Hello Guys, I have a DLL created using Borland C++ 6, I need to use the same DLL with VC++ 2008, I have the .DLL and .LIB files created by Borland and the header file exporting 2 functions that I need to use in my program (Header file looks like …

Member Avatar for Ancient Dragon
0
132
Member Avatar for Dolphinsfan

ok, i'm somewhat of a noob to c++ programming and i'm completly lost in my class as of now, i mean i understand the concepts(somewhat) but actually writting my own code is really confusing me, i dont want anyone to give me the answer, but if someone could guide me …

Member Avatar for Narue
0
153
Member Avatar for c_shaft05

[CODE]//Vars to know about Square* square; vector<Shape> shapes; [/CODE] I'm trying to add things that are shapes, or in this instance square (which inherits from shape), but whenever I call shapes.push_back(square), I get this error message: [CODE]draw.cpp:55: error: request for member ‘push_back’ in ‘shapes’, which is of non-class type ‘std::vector<Shape, …

Member Avatar for c_shaft05
0
118
Member Avatar for akn

Hi, I have a class linestorage which has a static member S (represents lines of words of characters). The problem is I don't know how to access this member in a function. I am getting this error message Info :Linking C:\DOCUMENTS AND SETTINGS\DELL.DFHWHLB1\MY DOCUMENTS\SPRING 09\CSCI 250\HW\HW1\HW1_P2\kwic.exe Error: Error: Unresolved external …

Member Avatar for Ancient Dragon
0
147

The End.