
please wait
by Sunshine1209
Loop with multiple input to single output
|
I have to condense this list of 20 inFile.txt files to 1 output file. How do I do that? #include <iostream> #include <fstream> #include <string> #incl... |
Jul 26, 2021 at 9:06am
[6 replies] Last: L46. There is no loop termination other than failing to open a file. H... (by seeplus)
|
by jaymann
knight moves: How to print the path
|
Hello Everyone: I am working on the knight moves problem and managed to print the number of moves but still need to print the path e.g. "3 moves: path is: [3... |
Jul 26, 2021 at 3:26am
[2 replies] Last: Thank you for the help. will try to follow your approach . (by jaymann)
|
by Zhylian
using namespace std
|
Hi everyone, I just noticed that (apparently) evrybody prefers to specify in the code the namespace of functions like `std::cout`. I'm wandering why. Is it any ... |
Jul 25, 2021 at 5:16pm
[7 replies] Last: I avoid easily preventable problems by never having using directives a... (by deleted account xyzzy)
|
by f22lightning
Printing PDF to paper from command line and get print job ID
|
I need to make a command line program that can be passed a path and it will silently print the PDF without any prompts and will return the job ID for the print ... |
Jul 24, 2021 at 4:04pm
[5 replies] Last: Hmm. There is a shell option to print non-text with right click, but ... (by jonnin)
|
by L67GS
Display vector contents
|
When displaying the contents of a vector is there a reason why print Works and cout does not work? This works: print(VectorName); This makes gcc ve... |
Jul 24, 2021 at 4:03pm
[8 replies] Last: > I was intending to suggest in general that an equality test shouldn... (by JLBorges)
|
by TracyJill
Library files for electronic components
|
Hi, I am new here and I am looking for guidance, not the code itself. I am an embedded engineer, and worked on electronics and c# a lot. We have a soft... |
Jul 24, 2021 at 11:40am
[1 reply] : > So, my question is, do I need to design that DLL file in C++ or we c... (by JLBorges)
|
by malakai
Need C++ implementation of KMP algorithm
|
I am looking for a simple C++ implementation of KMP (Knuth-Morris-Pratt) algorithm. I was able to understand the concept from this article https://www.w3spot.co... |
Jul 24, 2021 at 11:24am
[1 reply] : Duck found this very simple implementation; (test it thoroughly before... (by JLBorges)
|
How to extract only the data I required from different lines within a text file? |
Here is the problem: I was asked to extract some data from a text file and insert them into a structure Like this: employee.txt Emp Id = 1290229 Name = Luke... |
Jul 24, 2021 at 4:23am
[15 replies] Last: Andy: Thanks for the correction once again seeplus: your concept... (by ThisAintMeDude)
|
by Krish100
Function being called without declaration
|
New to c++ and tried writing a login program. When running, you need to answer login or register to choose to make or to login to an account. Though for some re... |
Jul 23, 2021 at 8:32pm
[12 replies] Last: Your functions called logFunction() and regFunction() are of type bool... (by Manga)
|
by andreasmax
C++ function to Interpolate 2D Scattered Data on to 2D grid
|
I am looking for a C++ program/function for Interpolation for 2-D gridded data in meshgrid format similar to interp2(X,Y,V,Xq,Yq) in Matlab or scipy.interpolate... |
Jul 23, 2021 at 6:38pm
[4 replies] Last: C++ does not have a built in one, you can find a library or, since thi... (by jonnin)
|
by kseokjk
How to send data to file
|
i have a quaetion regarding file in c++. if i want to send a data to file , i will do cout << " Year : " << year << endl; toFile << " Year : " << year ... |
Jul 23, 2021 at 11:38am
[9 replies] Last: Hello kseokjk, To go along with what seeplus said a complete progra... (by Handy Andy)
|
by SlowCoder
Class destructors, and when to use them
|
1. Different sites seem to say different things about when a destructor should be created. I've read it's only necessary when you explicitly use the "new" keyw... |
Jul 23, 2021 at 1:43am
[3 replies] Last: > Say I write an app that has a class, and I don't write a destructor,... (by JLBorges)
|
by Lacy9265
How allow the graph to be either weighted or unweighted and either directed or undirected?
|
I have code for an adjacency matrix which is use to represent a graph. How would I get this code to allow the graph to be either weighted or unweighted and eith... |
Jul 22, 2021 at 3:34pm
[2 replies] Last: Okay that helps. Thank you @ne555. (by Lacy9265)
|
by Lacy9265
Represent a graph using adjacent list
|
Write a C++ class derived from GraphInterface file. Use an adjacent list to represent the graph I have already done this with an adjacent matrix but now I need ... |
Jul 22, 2021 at 1:32pm
[12 replies] Last: So you don't know if the code you written is considered an adjacency l... (by Lacy9265)
|
by vboro
Getline skipping third line?
|
Hi! I have a task where I must get the data from a simple .txt file. It works perfectly until the third line must be used. It's a program where I must co... |
Jul 22, 2021 at 11:22am
[2 replies] Last: Hello vboro, It works perfectly until the third line must be used. ... (by Handy Andy)
|
by Newcolator
Splitting code into separate files
|
Hello I've just started using c++ so I'm learning as I go and doing lots of web searches. I'm trying to split my code into separate files as it's gotten quite ... |
Jul 22, 2021 at 9:24am
[3 replies] Last: Pass by reference . See http://www.cplusplus.com/doc/tutorial/functio... (by keskiverto)
|
by chuuuing
Compiler error: no matching member function for call to 'assign'
|
Hi everyone, I got the following compile error msgs and I cannot locate which code triggered this. Can someone help me to interpret the compilation message? ... |
Jul 21, 2021 at 9:19pm
[5 replies] Last: thanks for all the replies. due to the size of the project, I cannot ... (by chuuuing)
|
by SlowCoder
Trying to get my bearings with *pointers and &references, and how they work together
|
New member, and new to C++! 1. Do pointers always point to a reference? int b = 1; int *a = &b; vs int b = 1; int *a = b; 2. If any, what is the func... |
Jul 21, 2021 at 9:04pm
[3 replies] Last: int b = 1; int *a = b; this is a subtle error. if it works (it should... (by jonnin)
|
by agirideep
Hours keep coming up as zero.
|
#include <iostream> #include <iomanip> using namespace std; PROTOTYPES: void getPackage(char); bool validPackage(char); void getHours(int); bool validHours(... |
Jul 21, 2021 at 8:52pm
[4 replies] Last: Hello agirideep, I do have some suggestions, but am stuck not knowing... (by Handy Andy)
|
by empleat
Is it possible to use array in a loop as condition?
|
Is it possible to use an array as condition in a loop? For example in while loop? For instance: I want while loop recur unless index in array = {'G'}. wh... |
Jul 21, 2021 at 7:47pm
[7 replies] Last: When you enclosed 'G' in brackets in the while statement Visual Studio... (by deleted account xyzzy)
|