I dont know how return message when user fail to open Database.
I building this class to manage db
The "open" method return an OleDbConnection type to manage it later
On catch zone I cant return string , int or other types
class ApriDB { //Stato interno string connessione = ""; // metodi public ApriDB() { } // Costruttore di default public OleDbConnection open (string connessione) { OleDbConnection conn = new OleDbConnection(connessione);
I'm trying to write a program that opens a directory and for each file in directory,it creates a thread. Inside of the thread,it reads the numbers in file.(one number in one line)And then calculates the average of these numbers. I write something like this;
void *calculate(FILE *piece){ int a,k=0,s=0,ort; while(!feof(ayri)) { a=fgetc(ayri); s=s+a;
[Code] ....
When I run the programme,i get lots of errors like 'segmentation error' and some stuff about pthread_create. And I don't think the 'calculate' function is right.I don't know the right way to read numbers line by line.
Just wonder is it possible that if the file exist, this function below will fail by returning non-zero value?
_access( INIFilename, 00 ) 00 - check for Existence only
I noticed that sometimes if even the file exist, the function will fail or return non-zero value. So trying to find out and duplicate this error. It tends to happen intermittently. How can I find out what causing this error?
I'm trying to create a GUI with Open graphics Libraries.I have made a basic GUI that exits the program or shows the instructions if a option/Polygon is marked (A bigger one is behind them)But what I'm trying to do now is the following:
0. Start the direct access on the desktop 1. Screen: Press any key to continue 2. Select one option 2.1 Option one: Go to the circuit selection menu 2.1 Option two: View the instructions (Cleared) 2.1 Option three: Exit the game (Cleared) 3. Select a circuit 4. Go to the car selection menu 5. Select a car and start the race 6. Pause menu if Spacebar has been pressed
From the pause menu:
6.1. Go to the main menu 6.2. Restart the race 6.3. Exit
I know that it is OpenGL, but what i'm looking for is C++.How I could do that? What I have cleared is with IF but I'm looking for better alternatives.
I need to create a project that create a automated backup of a file.
i will get the file from C:/Folder/file.exe and move for a other created folder, but.. in every time that user make this backup, a folder will be created with year, month and date, like: C/Folder2/2014/April/16:42/file.exe.
I'm trying to write a program for a pong game using a tutorial online. Every time i try to run my program its telling me "Cannot find or open pdb file" I have tried running Microsoft visual c++ as administrator and checking the box next to the Microsoft symbol server. I only get a black console screen with a blinking cursor.
I am fairly new to programming and I am writing a small POS system which in the background creates a receipt. I guess the relevant code would be this:
#include <stdio.h> int main() { FILE *receipt; receipt = fopen("receipt.txt", "w"); fprintf(receipt, "Coffee Bar
[Code] ....
Of course the last bit wont be running for you, since the variables are missing. My question now is, that I like to open this file in a text editor. The file should be opened with a command withing the code. Is that possible at all? As you might can tell the receipt should pop up after the program ran and the user should be able to print it afterwards.
For homework I need to take a file of numbers (double) and fine their average. But, I seem to be having an issue just opening the file.
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; void get_average(ifstream& input_file); // Precondition: Reads all the numbers from input file stream // Postcondition: Prints out to the screen the average of the numbers
Reading a .dat file, i'm unable to open the file. This program is for a Air Quality index detector, the AQI machine records the particle concentration every minute and saves it into new data file for each day. So I need to make this program run every minute and convert the concentration in to the AQI readings.
The filename is of the format "ES642_2013-11-09.dat", where ES642 is the software name of the machine, and rest is the year, month and day. The code here is just for the file reading section:
Code: #include <iostream> #include <fstream> #include <string> using namespace std;
'test.exe': Loaded 'C:UsersPcDocumentsVisual Studio 2010Projects estDebug est.exe', Symbols loaded. 'test.exe': Loaded 'C:WindowsSysWOW64 tdll.dll', Symbols loaded (source information stripped). 'test.exe': Loaded 'C:WindowsSysWOW64kernel32.dll', Symbols loaded (source information stripped).
[Code]...
The thread 'Win32 Thread' (0x2d0) has exited with code 1 (0x1).
The program '[6040] test.exe: Native' has exited with code 1 (0x1). my code is not wrong but there is an error which ı dont understand ...where is my error?
someone told me to download the latest source and build that so i did, by unzipping it, cding to the source, running ./bootstrap.sh, ./b2, and finally ./b2 install. when i compile i get no errors but when i run it i get ./jade: error while loading shared libraries: libboost_regex.so.1.55.0: cannot open shared object file: No such file or directory
This my deposit function, i want to open the file (balance), then add the sum and store in on the text file.
float deposit( int x, int currentBalance) { cout<<" "<<endl; cout<<"Welcome to the deposit area"<<endl; cout << "Your new balance is:" << balance <<endl;
Need reading a .dat file, i'm unable to open the file
This program is for a Air Quality index detector, the AQI machine records the particle concentration every minute and saves it into new data file for each day. So I need to make this program run every minute and convert the concentration in to the AQI readings.
The filename is of the format "ES642_2013-11-09.dat", where ES642 is the software name of the machine, and rest is the year, month and day.
The code here is just for the file reading section:
#include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, const char * argv[]) {
my programme showing error 'unable to open inclde file ****' i fallowed the general procedure i.e., options-->directories--> ( inclde proper path) still not working..
and the file exists on disk, because the program just create it and closed the file handler. The error I got:
Debug assertion failed ... program name ... File: (and this is the strange thing!) f:ddvctoolscrt_bldself_x86crtsrcfstat64.c line:64
Why it displays this path? I did not added this path to project so why it tries to call this file? I have installed VC in different location and running x86 32bit machine.
I already succeed to run test raw_decode.c where I used libtiff.lib and libjpeg.lib also here I used the libraries. I already succeed to open file there using
Code: tif = TIFFOpen(srcfile,"r");
and srcfile = "./images/quad-tile.jpg.tiff".
Well I tried to use different path as "./images/ascii_test.tiff" but this also results in break. Where could be the problem that ascii_test.tiff cannot be opened?