49,761 Topics
| |
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 … | |
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 … | |
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... | |
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 … | |
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" … | |
[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, … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 << … | |
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(); … | |
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 … | |
[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' … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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, … | |
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 … |
The End.