7,373 Topics

Member Avatar for
Member Avatar for tarheelfan_08

Can someone tell me why my code is not writing to a data file! I get no errors and everything looks great! [code] #include "Account.h" #include <iostream> #include <fstream> #include <cstdlib> // for exit function using std::ofstream; int main() { ofstream outdata; const int SIZE = 6; //Account array Account …

Member Avatar for tarheelfan_08
0
213
Member Avatar for 3cats

I'm very new to C++, my midterm is requiring me to read from a txt file I created line by line. Each line has different subject code that requires some calculations. My understanding was that you open your file and read in the first line in the file, thats the …

Member Avatar for 3cats
0
174
Member Avatar for bgx90

I am trying to place a friend function of a template class named sort in its own header file. I keep getting errors when compiling my test program. I have tried different things to fix it, but nothing works. My experience with template classes is limited as is my knowledge …

Member Avatar for bgx90
0
237
Member Avatar for modesto916

Good Afternoon, I am from brasil, and i am beginning to study programming, I bought the book "C++ How To Program", and i am now trying to make a small software with each class in its file, with prototypes and etc, here is a simple program that i made to …

Member Avatar for modesto916
0
172
Member Avatar for bjeffries

What is the most effective way to upload pictures to a photo gallery? I am currently doing the excel CSV method, and just want to know if this is too time consuming and what is involved in coding a fairly complex upload form?

Member Avatar for bjeffries
-1
126
Member Avatar for joval

<input type="file"> will open a file open dialog when clicked. I want to open the same file open dialog, with the button only (no input text) and with Open text on the button (not Browse) - any ideas?

Member Avatar for diafol
0
107
Member Avatar for perosf

Hi i have this problem in my web cam fujitsu siemens pa2548 OS windows XP 32bit [URL="http://img715.imageshack.us/img715/2883/errorwq.jpg"]http://img715.imageshack.us/img715/2883/errorwq.jpg[/URL] I scan my computer with a [URL="http://www.nirsoft.net/utils/blue_screen_view.html"]http://www.nirsoft.net/utils/blue_screen_view.html[/URL] and shows me these errors [TEX]================================================== Filename : BisonCam.sys Address In Stack : BisonCam.sys+30e2 From Address : 0xa47b6000 To Address : 0xa4873980 Size : 0x000bd980 Time …

0
90
Member Avatar for j.ross

New Paragon NTFS for Mac OS X 8 includes HFS driver to provide access to HFS files and folders from any Windows-based PC!

0
124
Member Avatar for scorpio222

hi, i have an aspx page, Default.aspx, which runs when a web service is called. the output of the web service is something like this: http:\\xx.xx.xxx.xxx\FileDownload\Default.aspx?download=2.csv&type=csv This link above will download the csv file present on the server. The code for the default.aspx is given below. I want to know …

Member Avatar for murugavel84
0
181
Member Avatar for chipbu

I've got this code that read in a text file into a string [code=c]private void Read(string path) { StreamReader sr = new StreamReader(path); data = sr.ReadToEnd(); data = data.ToUpper(); sr.Close(); }[/code] it works all right with a small text file, say 1kb. But when I tried to read a 350KB …

Member Avatar for jonsca
0
186
Member Avatar for yeap521

Regarding the title, i want to know the exact way to writing text data to a text file on a web server using http connection in J2ME. I tried the way as below: OutputConnection connection=)OutputConnection)Connector.open("http://localhost/message.txt;append=true",Connector.WRITE); OutputStream out=connection.openOutputStream(); PrintStream output=new PrintStream(out); output.println("Testing"); out.close(); the codes have no problem and no exception. …

Member Avatar for peter_budo
0
104
Member Avatar for 3cats

I have looked around on this forum and none of the past posts really addressed my issue. I created a .txt file with cust no first and last name. I open the file and read in the first line of the file, this part works well. And it displays to …

Member Avatar for 3cats
0
168
Member Avatar for niranga

Hi All, This is the first time I'm working with FTP functions in PHP. I have to create a link to send a [B].sql[/B] file to another server using its' FTP logins. I used ftp_put() function in the following way [CODE]ftp_put($connection, $file_name_1, $file_name_2, FTP_ASCII);[/CODE] It works perfectly in my [B]localhost[/B]. …

Member Avatar for niranga
0
982
Member Avatar for Marine4God

Hello everyone. I am working on my lab assignment and am somewhat stuck on how to proceed. We are studying using the book [I]Starting out with C++: From Control Structures through Objects[/I] by Gaddis. The lab assignment is as stated: [QUOTE]NamesOf1980s.txt is a text file from the SSA detailing the …

Member Avatar for Salem
0
916
Member Avatar for coder19

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define TRAINING_LIST "./rc/training.list" #define TRAINING_FILE "./training_set/%s" #define TEST_PATH "./test_set/%s" #define PREDICTION_FILE "./prediction.txt" #define FEATURE_FILE "./feat/features.txt" #define MAX_RATINGS 100480508 // Ratings in entire training set (+1) #define MAX_CUSTOMERS 480190 // Customers in the entire training set (+1) #define MAX_MOVIES 17771 // Movies in …

Member Avatar for coder19
0
94
Member Avatar for g2gayan

Hello,.. Im a New Guy to this forum and 1st of all;... Hi :twisted: im a newbie to c# programming as well ,,, anyway.. i have a huge issue .. here is what s going to happen.. [CODE] if (txtPath.Text != "") { FileInfo fn = new FileInfo(txtPath.Text); string p …

Member Avatar for g2gayan
0
370
Member Avatar for mariosbikos

hi guys i have an urgent problem....we have been asked to make a battleship game in C which will have the formation of ships taken by a file txt.....for example 00000000 ppp00000 0000nnnn 00000000 etc...i want to open the file txt and then put every single character 0,p,n etc to …

Member Avatar for mariosbikos
0
293
Member Avatar for ygarin

Hi everyone! I wrote a Python 2.5 application, with GUI from Tkinter module. To make it short, the user has to load a file and can start to work on it. I made it Windows executable with py2exe, and installable with Inno, with a file association setting. So now, if …

Member Avatar for Gribouillis
0
410
Member Avatar for nko12

I know this is probably the noobiest question you have ever heard, but is their anyway to make forms in the same project actually COMMUNICATE with each other? Using Visual Studio 2010 for C#, I can't figure out how to make each separate form be basically synchronized with the main …

Member Avatar for kvprajapati
0
85
Member Avatar for niranga

Hi all, I am working on a PHP project. Im having a problem giving the 'src' for a image, because the image file is placed outside of the www folder :(. Let me explain more. When I log in to my server using FTP logins, it gives the directory structure …

Member Avatar for Owais_Khan
0
8K
Member Avatar for softdev

Hi Guys, I've noted that when using Netbeans, .jar file is created when you build your application. if i want executable jar file of my application, can i just take the same generated jar file, or should i create my own .jar via the command prompt. I mean whats the …

Member Avatar for softdev
0
115
Member Avatar for Vytautas

Hello, I'm trying to open file using a function in a header file and I think it works but I'm unsure if it's written as it should be. Should I use double pointer inside the FileOpen function like argv is or not? It also works without double pointers and that's …

Member Avatar for JuhaW
0
108
Member Avatar for jellyfishes

Hello all. It's my first forum post on DaniWeb. Hope to meet like-minded people here : ) I have installed a JQuery Photo Gallery: pretty nifty one. [url]http://coffeescripter.com/code/ad-gallery/[/url] I was planning to have a folder in my web directory called "Photographs", containing both photographs and thumbnails of the photographs for …

Member Avatar for Tofudisan
0
190
Member Avatar for JimD C++ Newb

Hi, I have a rather large binary file that I am attempting to read in, but I only want to read in the first 100 characters or so. I've tried searching the internet for help or an example, but I've only found examples that read in the entire file...and this …

Member Avatar for balmark
0
111
Member Avatar for s0lidjacks0n

I have three files that I need to link using a makefile but I continuously get undefined function errors and I cannot figure out why Makefile[CODE]# sectool.make CC = g++ CFLAGS = -c all: sectool sectool: Transposition.o Substitution.o System.o ${CC} -o sectool Transposition.o Substitution.o System.o System.o: System.cpp Transposition.cpp Substitution.cpp Substitution.h …

Member Avatar for mcriscolo
0
82
Member Avatar for laudaisoi

Hello everybody ! I'm a novice , and already started learn C++ . I try sorting string alphabetically from a text file . This is my code [CODE]#include <iostream> #include <fstream> using namespace std; // Quick Sort function void quickSort(char A[][15], int lower, int upper){ if (lower>=upper) return ; // …

Member Avatar for laudaisoi
0
948
Member Avatar for tomkaczocha

Hi guys, I hope you can help me with a bug. I have an update form to update data in a mysql database. Whenever a user wants to update the picture they uploaded it through the html form. For some reason my mysql querie on line 67 is not updating …

Member Avatar for tomkaczocha
0
145
Member Avatar for sunnynight

Dear All, I have a text file containing these lines: [QUOTE]12345 12 123 1234 123456 1234567890 123456789032453 1234567890724832445 12345.123456 12345.123 12.12 12[/QUOTE] And I want to read them from c:\numbers.txt and store them into an array and then do some calculations, then save the results in another file(c:\results.txt). I have …

Member Avatar for Banfa
1
6K
Member Avatar for bandit711

Every time i compile this code i come up with a additional set of numbers, but i don't know why. [CODE] #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <fstream> using namespace std; void calculateAverage(double quiz1, double quiz2, double quiz3, double test4, double& SAverage); int calculateGrade(double grade); int main() …

Member Avatar for bandit711
0
165
Member Avatar for azegurb

hi all i have a problem with file content copying. i have index.php and there are codes in it. i would like to create [COLOR="red"]indexa.php[/COLOR] and append[COLOR="red"] index.php [/COLOR]file contents to newly created [COLOR="red"]indexa.php [/COLOR]file thanks beforehands here is my file [CODE]<?php // This function shows your form function form(){ …

Member Avatar for azegurb
0
1K
Member Avatar for Lukezzz

I have a little spoky problem here. I really cant understand what it is. I am reading a file that is completely empty. But still the second MessageBox is showing this string: "22" I cant wrap my head around why if( line != "" ) is executing and no character …

Member Avatar for Lukezzz
0
110
Member Avatar for tan123

Hi, In my asp.net application (an inhouse software) I want users to be able to use files from Network (filepath stored in database). I use the following code to download the files: string strAttachmentID = ((Label)GridViewNotes.Rows[GridViewNotes.SelectedIndex].FindControl("lblAttachmentID")).Text; int AttachmentID = Convert.ToInt32(strAttachmentID); Attachment attachment = Attachment.GetAttachment_ByAttachmentID(AttachmentID); string str = @"\\" + attachment.FilePath; …

0
33
Member Avatar for zoro007

Hello, I want know how to find some of words in a file. For example : find one word [CODE]if "word" in open(file).read(): print file[/CODE] I wand do that but with 5 words [ word1 , word2 , word3 , word4 , word5 ] If find word1 or word2 or …

Member Avatar for sebcbien
0
164
Member Avatar for belboy

Country Gold Silver Bronze Total US 9 15 13 37 GE 10 13 7 30 CA 14 7 5 26 NO 9 8 6 23 AU 4 6 6 16 RF 3 5 7 15 KO 6 6 2 14 CH 5 2 4 11 SW 5 2 4 11 …

Member Avatar for TrustyTony
0
115
Member Avatar for lishannx

hi, have a slight problem here. this is my open file dialog code. [CODE] private void browseToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Browse And Upload A Template."; ofd.Filter = "All files (*.*)|*.*|All files (*.*)|*.*"; DialogResult dr = ofd.ShowDialog(); if (dr == DialogResult.OK) { //bitmap …

Member Avatar for kvprajapati
0
137
Member Avatar for kjock002

i found this code [URL="http://www.daniweb.com/forums/thread233959.html"]here[/URL] and i tested the code and it isn't working for me this is what my code looks like: [CODE] # PURPOSE: to count the number of words, lines, and characters in a file # # INPUT(S): a file name to be used # # OUTPUT(S): …

Member Avatar for TrustyTony
0
2K
Member Avatar for xsach

i need to find all the files in the directory and sub directory that have a text file..within this text file there is a string called average with some value.. the code below works fine for a single directory...but i need to find the same text files in the sub …

Member Avatar for xsach
0
114
Member Avatar for shahab.burki

Hi, My code reads a string from a file. But it misses the lastone. can you help me? 1..Text File [CODE]102.15.12.10 15.14.106.6 1591 1592 bit_torrent[/CODE] 2.. Code [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> struct list_node{ char src_ip[15]; char dst_ip[15]; char src_port[4]; char dst_port[4]; char protocol[15]; }; typedef struct list_node node; …

Member Avatar for shahab.burki
0
99
Member Avatar for sdgz747

I am trying to read a file into an array and set the min and max values. At this point in my program, I am trying to just read it into an array and then display that array. I still have more to do in the program, but I am …

Member Avatar for WaltP
0
112
Member Avatar for KSUliz

[code=java] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.util.*; public class Transfer extends JFrame implements ActionListener { //Declare output stream DataOutputStream output; //Construct a panel for the fields and buttons JPanel fieldPanel = new JPanel(); JPanel buttonPanel = new JPanel(); //Construct labels and text boxes JLabel …

Member Avatar for KSUliz
0
136
Member Avatar for farag

Hello, i want to know the best practice to 1. read an XML file and store it in SQL data base and 2. modify the data base whenever the XML file modified, i created a table on data base on SQL server with columns has the same names like XML …

Member Avatar for farag
0
842
Member Avatar for bbrradd

I have to read lines from a text file and reformat them so that the first letter is uppercase and the rest are lowercase. I did that with no problem. also i needed to count the total words in the file, and did that easily.,but i also need to count …

Member Avatar for WaltP
0
1K
Member Avatar for vineshn

hi, I am new to python :). I am having a file say "test.c" test.c file contains test1 test2 test3 test4 and my output should be write in a file as newtest.c... -h test1 -e temp -x temp2 -o temp3 -h test2 -e temp -x temp2 -o temp3 -h test3 …

Member Avatar for vineshn
-1
134
Member Avatar for chriscalifornia

Hey everyone, I hope someone can help me figure this one out! I'm trying to take the live feed I have from our ip camera (a .av file, whatever format that is) and buffer it onto a server to be streamed. So far ive written a c# app that downloads …

0
39
Member Avatar for PDB1982

How would I, if it's even possible, create an array to read/store the input values from a input text file? Here is what I was thinking, but I want to pretend as if I don't know the amount of values in the file. Input File Has: 21.22, 13.23, 43.12, 123.54, …

0
71
Member Avatar for sana zafar

Hi I am attempting to write a code that will input the name of a file and output the number of times each letter appears in the file, and it is case-insensitive.For example : a|A : 5 b|B : 3 c|C : 0 d|D : 7 e|E : 0 so …

Member Avatar for Freaky_Chris
0
248
Member Avatar for adabq

This is something I've been struggling with for a couple months now without having much luck. I beginning to think it's not possible but I'm hoping someone here can prove me wrong. The environment I am working with is a JSP page that interfaces with a java Bean. I want …

Member Avatar for adabq
0
463
Member Avatar for crodriguez08

Hey, I'm having trouble of making my program work. So far I managed it to read the file and display the numbers (just to verify that it is being read right), but I'm not sure if the storing is functioning well, as when I pick another option, well, it doesn't …

Member Avatar for crodriguez08
0
352
Member Avatar for Szpilona

Hi, I've got a lexer created with flex (under cygwin). Normally I compile it to an .exe file. For the newest project I need a lexer to use in a bigger C# program running on Windows XP. Of course I can execute a file using System.Diagnostics.Process. But it is not …

0
101
Member Avatar for Rmitboy

I am writing a c program to copy content of one text file to another but with the copied lines in the destination file preceded by the length of the line and a blank space. Let me illustrate my expectation: original.txt destination.txt daniweb 7 daniweb forum 5 forum plz help …

Member Avatar for jephthah
0
186

The End.