-
Began Watching Runtime abort when using different input file
Hi, I'm wondering what could cause this type of runtime error: My program basically reads data from different kinds of data files, either a minute data file or a 5 … -
Stopped Watching Runtime abort when using different input file
Hi, I'm wondering what could cause this type of runtime error: My program basically reads data from different kinds of data files, either a minute data file or a 5 … -
Replied To a Post in Program to compute the definite integralno
You could start with some definitions like this: const double EPSILON = 0.000001; /* change here to what you want */ /* define the function to integrate ... */ double … -
Replied To a Post in remove lines
@Gribouillis ... Thank you for the more Pythonic example code ... (and ref.) I suspected that might be the case in Python :) -
Replied To a Post in Program which compute number of days between two dates
And here is an example of the above ... to get you started: /* daysBetween.c */ /* 2015-08-29 */ #include <stdio.h> #include <math.h> const int DAYS_IN_MONTH[] = { 0, 31, … -
Replied To a Post in Program to compute the definite integralno
Firstly, please see the comments about clearing up your code, at your other post. https://www.daniweb.com/software-development/c/threads/499170/program-which-compute-number-of-days-between-two-dates You also have not followed the spec's you were assigned. * You are to repeat … -
Replied To a Post in Program which compute number of days between two dates
Without you stating the particular problem with which you wish to have help ... here are several ways to begin to clear up your code and make it easier to … -
Replied To a Post in Runtime abort when using different input file
Without seeing all the code you are using ... we can only guess at the problem(s), according to our own experience. Inspect the good (working ok) 1st file ... by … -
Began Watching remove lines
Hi, I have text file where I have these lines with numbers: e, 1, 2 e, 1, 3 e, 2, 1 e, 3, 4 etc. I need remove similar lines, … -
Replied To a Post in remove lines
This may get you started ... # removeSimilarItems.py # # 2015-08-29 # lst = [ ['e', 1, 2], ['e', 2, 1], ['e', 1, 2], ['e', 2, 3] ] lst2 = … -
Began Watching Program to compute the definite integralno
Compute the definite integral of the curve x 2 − 3 x + 2 for x ranging from 2 to 8. Compute the same by approximating it by dividing … -
Replied To a Post in Program to compute the definite integralno
Welcome to Daniweb. Please note! We will be able to help you if you firstly show us the code you have tried so far ... -
Began Watching Program which compute number of days between two dates
Compute number of days between two dates of the same year. A date is given as two numbers (day, month). Assume that month of Feb has 28 days -
Replied To a Post in Program which compute number of days between two dates
We will be able to help you if you firstly show us the code you have tried so far ... -
Replied To a Post in Runtime abort when using different input file
The longer (2nd) file length is given as 194.93 KB The shorter (1st and good) file length is given as 78.12 KB Did you not see 'a problem' with (all) … -
Replied To a Post in Runtime abort when using different input file
Did you *look* at the two .txt files with a text editor? There is something glaringly wrong with the 2nd longer file ... it seems quite corrupted, just a little … -
Began Watching Runtime abort when using different input file
Hi, I'm wondering what could cause this type of runtime error: My program basically reads data from different kinds of data files, either a minute data file or a 5 … -
Replied To a Post in Runtime abort when using different input file
Perhaps the longer data file is too long to handle? Try splitting it up into 1/2's and see if each 1/2, by itself, processes ok? Is you output file looking … -
Began Watching Returning address of object to main using new
I am defining a class outside a function and inside a function and returning the address of the object using new to main. I have no problems when the class … -
Replied To a Post in Returning address of object to main using new
> Standard C and C++ do not support nested functions, but: GCC supports nested functions in C, as a language extension... https://en.m.wikipedia.org/wiki/Nested_function Note: in C++, it seems you are limited … -
Replied To a Post in Text File to Excel File/CSV
Is your expanded problem to process multiple files in a folder? If so, then you could modify the example to be looking for the (input) .txt file names from standard … -
Replied To a Post in Text File to Excel File/CSV
Test this code: // call string constructor string test2( "good better best" ); // call istringstream constructor istringstream is( test2 ); string x,tmp,z; // extract words/strings from is object is … -
Replied To a Post in Text File to Excel File/CSV
Can you test this code ? cout << "Enter 3 words separated by a space: "; string a,b,c; cin >> a >> b >> c; cout << "You entered: " … -
Replied To a Post in Text File to Excel File/CSV
In C++ you need to write your own code to print out the elements of an array ... string test = "a BB ccc"; istringstream iss( test ); string str[3]; … -
Replied To a Post in Text File to Excel File/CSV
> iss >> tmp; //is getting the next line? No ... getting the next item. string test = "a BB ccc"; istringstream iss( test ); string str[3]; iss >> str[0] … -
Replied To a Post in Text File to Excel File/CSV
Did you try out the working code I provided? Did you read the comments in the code and try to follow the steps? If you do not take time to … -
Replied To a Post in Text File to Excel File/CSV
You have already been given a working C++ example solution ... if you are really sincere about learning to program in C++, then ... *you really do need to start … -
Replied To a Post in Text File to Excel File/CSV
This code of yours: string PK; // stands for primary key; while ( getline( fin, line) && PK++ > 1); PK = 98; does NOT make any sense at all! … -
Replied To a Post in Text File to Excel File/CSV
Hint : the code might be a little simpler ... Read / discard 1st 3 lines ... Then read a line ... and while exists next line and next line … -
Replied To a Post in Text File to Excel File/CSV
NO! > This code: while( iss >> tmp && tmp.substr(0,3) != "333" ) ; will be my reference I change 333 to 98, But I don't know where to put … -
Replied To a Post in Text File to Excel File/CSV
The raw data file NEEDs to be 'massaged' to be regular to be read ok ... IF these TWO lines are FIXED ... It seems to be ALL read ok. … -
Replied To a Post in Text File to Excel File/CSV
You need to have the file it is looking for ... available. For ease of access, place the file to be read in the same folder as your compiled .exe … -
Replied To a Post in Text File to Excel File/CSV
You really do not need to read the processed records into a vector ... I would keep it simple ... something like this: // fileReadWrite.cpp // #include <iostream> #include <fstream> … -
Replied To a Post in Text File to Excel File/CSV
Show us the code you have tried so far ... for this: > You could read/skip the first 2 lines ... Then read (in pairs of) 2 lines, skipping over … -
Replied To a Post in Text File to Excel File/CSV
To start, you could look at the file read/parse examples here: http://developers-heaven.net/forum/index.php/topic,2019.0.html -
Began Watching Text File to Excel File/CSV
Hi everyone; I got no idea how to start this and if it is possible; I have a text file (.txt) that have lot of lines and I want it … -
Replied To a Post in Text File to Excel File/CSV
You could read/skip the first 2 lines ... Then read 2 lines, skipping over that first line and parsing the 2nd line ... till done You could use stringstream objects … -
Began Watching CPP
I am a kid of 15 and just started learning cpp. I want to make a simple programme wherby if i say hi to the computer it must respond by … -
Replied To a Post in CPP
Do NOT use the above link ... because, the 'Hello World' example program there does NOT conform to standard C++ ... Standard C++ uses: "int main()" #include <iostream> //using namespace … -
Began Watching I want help in writing a Program in C language.
I need help in writing a the following programs in C language: We want to determine whether a long string of a’s and b’s has the property that the number … -
Replied To a Post in I want help in writing a Program in C language.
Do you know how to input a long C string? In a loop, you could prompt (use printf) and then use fgets and a large char buffer (length pre-fixed at … -
Replied To a Post in Proramming
Hi Pavan, Being new at Daniweb, you may not know it is considered inappropriate to 'hijack' some one else's question. So ... please start a new 'thread' with your own … -
Began Watching Proramming
Hi i am Robin from Bangladesh. I am a student of CSE(Computer Science Engineering). My dream is want to Job in Google thats why good and best programming is need … -
Replied To a Post in Proramming
You might like to also see this: Six Fast Steps to Programming in C http://developers-heaven.net/forum/index.php/topic,2022.0.html -
Replied To a Post in Split String
Your code would be so much more C++ like if you could follow the example of Dani's @NathanOliver ... But if you really have to use C strings and pointers … -
Began Watching count frequency
#include <stdio.h> #include <string.h> int main() { char string[100]; int c = 0, count[26] = {0}; printf("Enter a string\n"); gets(string); while (string[c] != '\0') { if (string[c] >= 'a' && … -
Replied To a Post in count frequency
> count frequency Your title might have given you an hint about what was happening ... Your goal seems to have been to find the frequency of each lower case … -
Began Watching Program to display Factors of a Number
can someone help me with this? "PROGRAM TO DISPLAY FACTORS OF A NUMBER" Use A1,A2,A3..as variable. Sample output Enter apositive integer: 60 Factors of 60 are: 1 2 3 4 … -
Replied To a Post in Program to display Factors of a Number
> My teacher say, that we should use stdio.h kg conio.h stdio.h is commonly used for io (input/output) for programs in C, so you would be better to post this … -
Began Watching Split String
Hi! I am writing my own string splitter and i'm stuck. When I'm trying to split the same string the second time im getting only the first word. Im using …
The End.