General C++ Programming - February 2018 (Page 11)

Activity Selection Promblem
 
I have to take a text file and using a greedy algorithm determine which activities and how many activities I can do in a given set. Here is an example of the te...
[2 replies] Last: Thanks this was a big help. I don't know why but my brain just deiced ... (by jarbeme)
C++: how use arrays on our class's?
 
how i get the array size? heres my class: struct Vertex //Overloaded Vertex Structure { Vertex() {} Vertex(float x, float y, float z, float cr, float cg...
[3 replies] Last: Glad I could help :) (by goldenchicken)
Find 5 errors
 
Please help me find 5 errors in this program! // This program averages 3 test scores. // It uses the variable perfectScore as a flag. include <iostream> ...
[4 replies] Last: The best way I can think of right now, and forgive me cause I am suffe... (by jarbeme)
by KB93
Write to text file from list without using direct loop using std::list and std::algorithm c++
 
I have a program that reads a list of assignments and removes the "bad" assignments, then writes into a new file. My function that removes the bad assignments w...
[1 reply] : "Direct loops" typically means "loops you write yourself, as opposed t... (by Duthomhas)
by KB93
Read text file into list without using direct while loop using std::list c++
 
I have a program that reads a list of assignments and removes the "bad" assignments, then writes into a new file. My function that removes the bad assignments w...
[3 replies] Last: This ended up working for me thanks! std::istream_iterator<Assignme... (by KB93)
by ozcy
Apache Ant and gcc/g++
 
Hi comunity... I need to learn how to manage the compilations of c/c++ programs with apache ant. (labor reasons) The problem is that, most of the aviable ...
[1 reply] : Problem: failed to create task or type cc Somewhere there might be a ... (by CPPAWhile)
How can I read a file.txt in a list/forward_list
 
Need this for exam !
[2 replies] Last: I don't think that there was a request to actually write code. More li... (by keskiverto)
by ztdep
vector<vector<double>> vs c array
 
Dear friends: The function "DBPutQuadvar1" in silo library need input into the following two dimensional array "comp" which in defined as following in the ...
[2 replies] Last: Thank you very much for your help. (by ztdep)
How to declare and initialize array of char**
 
I want to declare and initialize an array of char**,here is my code, const char** g_arStr = { { "one", "two", "three" }, { "me", "you", "h...
[4 replies] Last: I personally prefer array over vector Strongly prefer std::array o... (by mbozzi)
Designing a library that can handle CSV files
 
I need help with designing a java library that can handle csv files. Can you please help me on how to go about creating a library that can do so? as well as cre...
[5 replies] Last: [quote=jonnin]csv is just a plain text file with commas in it. That's ... (by Duthomhas)
unintended inlining
 
So I just played around with Compiler Explorer and I noticed that compilers still pay a lot of attention to the inline keyword. Clang treats functions that are ...
[5 replies] Last: Yeah, I think all compilers have ways of disabling and forcing inlinin... (by Peter87)
Cheapest Path in Graph
 
Hi everybody, I have a graph with n x n vertices which are connected like this: (Example for n = 4):https://gyazo.com/d9391dae4291c7d696ef9b6bffb0a2c5 That m...
[10 replies] Last: That sounds reasonable. Now can you express that for an NxN grid? Wo... (by Civer1999)
Machine Learning open source for C++
 
I know this question has been asked before but many of the suggested packages such as MLC++ and shark the main pages seems not longer working. We are doing som...
[5 replies] Last: in order to help people looking for this information, besides the MLPA... (by salentoq)
by Alb13G
data for a clipped cone
 
This is a program for finding data for a clipped cone I'm not getting the equations for slant_height ,volume,surface area right where am I going wrong ? #...
[3 replies] Last: Are your dimensions those shown as r1, r2 and h below? .\ ... (by lastchance)
Deleting pointer to const char * - pointer being freed was not allocated
 
When I run following code: class A { const char *text; public: A(const char *text) : text(text) {} virtual ~A() { delete text; // the s...
[19 replies] Last: We usually just went to 90's procedural and very simple classes for th... (by jonnin)
Timed delay for each new connection to my server
 
Hello guys. I have this Open Source game server that I recently started working on. Unexpected, the server gets populated real quick and some angry users tries ...
[17 replies] Last: Are there still problems you need help with? I would like to add th... (by Edelweise)
C++ Array help ASAP!
 
Hi there, I am new to C++ and need more eyes to see if this is correct. This is the instructions: Define an array data structure with at least 5 items, which...
[7 replies] Last: A friend of mine recommended this free one: https://www.edx.org/cours... (by rjphares)
by AceK
Socket programming question
 
Hi there ladies and gents, I'm busy with this client-server software and my question is "how are data packets identified between the client and server?". I know...
[3 replies] Last: @jonnin, I thought of doing exactly that, thank you for confirming tha... (by AceK)
Having a problem with undeclared identifiers
 
I know that I have sum listed as int sum but when I go to debug it shows up as undeclared identifier. I'm having the same issue with total_properties in Case 5 ...
[3 replies] Last: That jsut means that there were lots of errors beforehand, but the inc... (by doug4)
February 2018 Pages: 1... 91011
  Archived months: [jan2018] [mar2018]

This is an archived page. To post a new message, go to the current page.