C/C++ :: Read CSV File From Flash Drive (Ubuntu 12.04)

Mar 26, 2013

I want to read a file from my flash drive called text.csv. However, I cannot even open the port where my flash drive is connected. This is the code that I am using, but I get error since the first part. When I run the program it says "fopen Error". I am using Ubuntu 12.04.

#include<stdio.h>
#include<string.h>  
#define SIZE 1
#define NUMELEM 5  
int main(void) {
    FILE* fd = NULL;

[Code] ....

View 1 Replies


ADVERTISEMENT

Visual C++ :: Partitioning USB Flash Drive?

Dec 9, 2014

I have written some code to make two partitions in USB flash drive. When I ran it I am not able to make partitions on usb. What'll be the problem in this code.

Code:
/-------------------INITIALIZE AND PARTITION-------------------------------//
#include "stdafx.h"
#include <Windows.h>
#include <stdio.h>

[Code].....

View 3 Replies View Related

C/C++ :: Writing To Specific Sector In Flash Drive

Apr 22, 2015

I am trying to write a to a specific sector in a flash drive. The problem is that it will only allow me to write to sectors 0 to 15. When I try sector 16 or higher nothing happens, but in sector 0 to 15 is is working fine.

#define BUFFER_SIZE 512
int main(void) {
FILE *volume;
int k = 0;
long long sector = 0;
char buf[BUFFER_SIZE] = {0};

[Code] .....

View 14 Replies View Related

C :: Ubuntu File Compile Error GCC

Sep 27, 2014

what can i do to fix ? why do i get the error ?

View 2 Replies View Related

C Sharp :: How To Remove All Format Of Video File And Flash File

Dec 11, 2012

I am creating small application using c#.net.I removed all image tag using regular expression no I want to remove all video file and flash file also in source code of webpage.

so far I have tried this ...

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

[Code] .....

View 1 Replies View Related

C# :: Detecting CD-ROM Drive And Grab Filepath Of Only CSV File

Jul 8, 2014

I would like the user to insert a CD into their computer and click on an button on my application that allows them to read the CD-ROM and find a specific file type, e.g. csv, and then grab the info in the csv file.

I already have my StreamReader setup grabbing a filepath.

Now I am just wondering...how do I detect the CD-ROM and how do I grab the filepath of the only CSV file on the CD-ROM?

What's behind detecting a CD-ROM and grabbing a specific file type from a CD-ROM?

I heard about DriveInfo

However, that only allows me to detect a drive but not look at it's contents.

View 14 Replies View Related

C# :: Saving Excel File In D Drive New Folder?

Jul 17, 2014

I am trying to save the excel file in D:/newfolder. but the file saving as newfolderFilename. The newfolder is already created in D drive. File save path i am getting from textbox ....

View 14 Replies View Related

C# :: Mapped Network Drive - Deleting Or Moving A File

Sep 16, 2014

Currently I'm trying to do something extremely basic: delete or move a file

I have a mapped network drive (Y) where I have a file I need to move from one folder to another

First was doing the obvious:

System.IO.File.Move("Y:TempFile.txt", "Y:Temp2File.txt");

Not much to go wrong here, right? As long as I have the correct permission to write in the folders and the folders exists, this would normally go smooth. But for some reason it only copies the file. The source file still exists, but it has successfully copied the file to the destination folder. No exceptions has been thrown or anything... but the file still exists in the source directory

I then changed the code to the following:

System.IO.File.Copy("Y:TempFile.txt", "Y:Temp2File.txt");
System.IO.File.Delete("Y:TempFile.txt");
Console.WriteLine("See mommy, no Exceptions");

As expected the file copies correctly, but the delete command is completely ignored. The file is not deleted, but the Console.WriteLine command is called

I'm running the application as the logged in user. The user has permission to delete the file. If I try from Windows Explorer, the file is correctly deleted. Unfortunately my application refuses to delete the file and even worse, it will not even throw an Exception.

View 10 Replies View Related

C Sharp :: Copying A File From Current Directory To System Drive

Feb 8, 2014

I have tried to use File.Copy and File.Move but non of them would work as I expected .....

View 1 Replies View Related

C++ :: Create A Program That Is Able To Save Database Of Items To File On Hard Drive

Mar 18, 2013

Write a program that is able to save a list of items such as books, CDs, or DVDs and the items that are saved must have attributes associated with them. For example a book has a title, author, publisher, and ISBN.I would like to create a program that is able to save the database of items to a file on the hard drive and also retrieve it from the hard drive.I have this for a start of how to set up a storing program.

#include <iostream>
#include <iomanip>
using namespace std;
int main () {
const int arraySize = 10;
int a[arraySize] = { 2, 6, 4, 10, 12, 89, 68, 45, 37 };
int i, hold;

[code]....

View 2 Replies View Related

C++ :: Compile OpenGL Program In Ubuntu

Aug 15, 2014

I am trying to compile an OpenGL program in Ubuntu.This program opens a blank window.

Code:

#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <cstdio>
#include <iostream>
int main(int argc,char* argv[])

[code]....

View 6 Replies View Related

C++ :: Cannot Write As Binary Using Dat Format In Ubuntu

Nov 29, 2014

I cannot write as binary using .dat format in ubuntu, why?

View 5 Replies View Related

C/C++ :: Sending Data To USB Port In Ubuntu?

Apr 21, 2014

How to send a keystroke or a mouse event to another running process in Ubuntu? I want to write a C program that reads data from the USB port sent by AVR Micro Controller board continuously.In response to that it checks the data received and sends a command to another process running on the computer? Example,when the program reads 101 from the USB port it sends left mouse button down to the VLC media player window that is currently running?

View 1 Replies View Related

C++ :: Reduction Of The Flash Footprint

Nov 26, 2014

I'm currently involved in an embedded (cortex M3) C++ project where we're about to run out of flash.

A quick check of the map file give that, in our case, the destructors consume about 10-15% of the available space. Since we're allocating all things that are needed at startup but never delete anything (both a requirement & also impossible due to the lack of a proper memory manager) the thought of getting rid of all destructors in the target build is appealing.

I know that this question is somewhat crazy/desperate but is there a safe way of telling gcc not to emit any code for destructors? If so, can that be made in such a way that a linker error catch for instance mistakes such as creating an object on stack?

View 12 Replies View Related

C++ :: Program Code To Create Database Add Delete Record In Ubuntu

Feb 13, 2014

i want programcode which can be executed for create database add delete record in ubuntu

View 1 Replies View Related

C++ :: Flash Memory Simulation Using A Code

Jan 23, 2013

I have to simulate flash memory using C++ for a project.

View 2 Replies View Related

C :: Ubuntu Build - Test Program To See If Shared Library Properly Built

May 22, 2013

I have created a shared object in Ubuntu (libMYLIB.so). I am now trying to compile a simple test program (testmylib.c) to see if the shared object is properly built. I am getting an error that the build cannot find the shared object. My build command is:

gcc -lm -l /dir/mylib -lMYLIB.so -o testmylib testmylib.c

where /dir/mylib is where my source and libMYLIB.so reside.

What am I doing wrong?

View 9 Replies View Related

C Sharp :: Alter Size Of Flash Movies?

Nov 5, 2012

I have a flash movie that is bigger than the axShockwaveFlash placeholder that plays it. The axShockwaveFlash placeholder expands to the size of the movie.

I have found a website at [URL] but asp is totaly different from c#.

How can I make the movie shrink to fit in the axShockwaveFlash placeholder?

View 2 Replies View Related

C :: Retrieving Values That Are Stored To Compact Flash Card

Sep 19, 2013

My specific request is for retrieving values that are stored to a CompactFlash card. I am able to store values (we call them recipes) to the CompactFlash card as .csv file. I just haven't been able to figure out the code to retrieve this information back to the touchscreen.

Code:
// Create a new folder if it doesn't exist
CreateDirectory("/recipes");
//Create the file if it doesn't exist
CreateFile("/recipes/recipe.csv");
//open the file
hfile = OpenFile("/recipes/recipe.csv", 2);

[Code]....

Now with that said, I would like to retrieve these values from the .csv file.

View 7 Replies View Related

C++ :: Flash Card Type Console Application - Declaring Array Of Hexadecimals

Dec 26, 2013

I'm making a flash card type console application using visual studios 2013. The flash cards contain character that I can display using unicode. So far I am looking at about 200 characters across 2 unicode blocks which I don't want to hard code into my arrays. I thought of initializing my arrays using a loop. The only problem is I don't know how to add in hexadecimal. So is there a way to initialize my array without having to input 200 values my self? Also is hexadecimal addition possible without me having to write a function for it?

View 3 Replies View Related

C# :: Using Linq To Get DriveInfo Of ONE Drive

Jul 23, 2014

I want some simple code which will return only the DriveInfo from one drive. I have the below code but it isn't displaying what I expect it to display, I have a feeling i'm using Linq wrong!

var dname = from n in System.IO.DriveInfo.GetDrives() where n.Name == "F" select n.VolumeLabel;
richTextBox2.AppendText(dname.ToString() + "
");

The above should return the devices VolumeLabel which is in port F.

Instead I get the following:

System.Linq.Enumerable+WhereSelectArrayIterator`2[System.IO.DriveInfo,System.String]

View 5 Replies View Related

C++ :: Presence Of A Folder In A Drive?

Dec 15, 2012

using C++ how can i check the presence of a folder in a drive.

The path of the folder is available in a std::string like std::string path = "C:TestFolder";

View 3 Replies View Related

C++ :: Safely Eject USB Drive (In Windows)

May 7, 2014

I would like to be able to safely eject a USB drive (in Windows) when user selects that drive in a listbox and clicks the Eject button in an MFC dialog app. Any functions or (link) that would be up to date (i.e. compatible with Windows 8)?

View 1 Replies View Related

C :: Read Contents Of A File Using Low I/O Read Statements

May 15, 2013

I want to read the contents of a file block (512 bytes) by block using low I/O read statements. Each record is 64 bytes long and has a pre-defined structure. The first 4 bytes are an unsigned integer; the next 20 bytes are ascii text, etc.

I have a buffer which I can access with buf[0] to buf[63] to read the first record and then buf[64] to buf[127] for the second, etc. However, I was wondering how to map a record so that I can refer to an integer as an integer and a float as float, etc. I can't create a struct and move the 64 bytes to it, as I will have alllignment/padding problems.

What is the standard way to deal with records in C?

View 5 Replies View Related

C :: How To Access Sata Hard Drive At Sector Level

Mar 7, 2013

I want to access sata hard drive(eg. D drive) at sector level using C programming.I want to read the values stored in the memory locations.

View 3 Replies View Related

Visual C++ :: Get Path To Recycle Bin Folder For Specific Drive?

May 29, 2014

there's a way to get a path to the recycle bin folder for a specific drive for the current user?

Say, on the input one provides "C:" and on the output you get "C:$Recycle.BinS-1-5-18"

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved