General C++ Programming - October 2019 (Page 10)

Changing file extensions.....from .lhs to .txt
 
yeneb (1) Please help me to make a program that will help me to change a large number of files with the .lhs extension to .txt extension. Nb: A changeextension...
[1 reply] : ren *.lhs *.txt (by lastchance)
little bit of help
 
Hello, im doing my first course in university and can't understand the task. Could any kind soul help me with it? I already appreciate it very much. Write a ...
[1 reply] : <cmath> has sqrt. If you are supposed to cook up your own, a web sea... (by jonnin)
the overloading operators can have more than 2 parameters?
 
the overloading operators can have more than 2 parameters? i'm thinking on 'operator >>' or 'operator <<', because it can be shift or using the ostream class.....
[15 replies] Last: Sorry, I had a typo. I thought you had, so I mentioned it. :)... (by George P)
Game accuracy
 
Hi everyone. I have a task to make a game for my class where the user can mine for gold but if they hit coal they lose. I was hoping someone would look over my ...
[6 replies] Last: I believe I fixed it but it won't build the program. Just to point... (by doug4)
by kwaifu
Read data from a file
 
I am trying to use ifstream to read data from a .txt and store it into different arrays. The problem is that the data are numbers and not letters, This is wh...
[3 replies] Last: You don't have to compile it all at the same time. Just implement smal... (by fiji885)
Bresenham's Circle Drawing algorithm
 
Hi guys, so if you read my last post you would know that I'm experimenting with graphics and drawing and interacting with geometric shapes, so drawing a rect...
[5 replies] Last: Not sure if this is a question about math, but the midpoint circle alg... (by poteto)
Passing variables between functions
 
hey everyone, I am trying to create two functions 1)sets a 2d dynamic arrays full of certain characters 2) return the character in the row and column input s...
[4 replies] Last: I'll recheck with them Thank you again (by Jack Van Stone)
Traverse unordered_map while inserting new nodes
 
I'm not english native, so my explanation can be some what weird. The simulation function below reads the cells inside the map, breed the cell if it's active a...
[3 replies] Last: I think you have the idea. struct Data struct Data {... (by Duthomhas)
Finding Odd Numbers
 
Hey guys, I am new to c++ and I have been doing many exercises to help me learn to code and to train my brain on how to visualize how to start code. Here I a...
[1 reply] : #include <iostream> int main() { int start ; std::cout << "e... (by JLBorges)
Boost geometric libraries
 
Hi guys, I am watching these two youtube tutorials on the boost::geometry and graph libraries - https://www.youtube.com/watch?v=mFXD8xSXzxI - https://ww...
[3 replies] Last: I'm chiming in to expand on the answers you've received thus far. Boo... (by Niccolo)
by Michu
Write a program using (C or C++) to implement the following algorithm - Shortest Job First (SJF)
 
Write a program using (C or C++) to implement the following algorithm - Non Pre-emptive Priority For each algorithm compute waiting time; turnaround time...
[2 replies] Last: from what you gave us, is just sort jobs by length. fire them off in ... (by jonnin)
Need help with weekly pay calculator
 
You forgot to mention what you need help with. http://www.cplusplus.com/forum/articles/1295/
[no replies]
2D Matrix not being copied correctly in addition of 2 matrices
 
Please find the below code for addition of two matrices #include<iostream> using namespace std; void input_mat(int x ,int m,int n) { int i,j; for(i=0;i...
[6 replies] Last: Thanks for the info and help (by abcdef123)
A doubt in swap using pointers
 
#include <iostream> using namespace std; void swap(int *x, int *y) {    int temp;    temp = *x;    *x = *y;    *y = temp;   } int main...
[3 replies] Last: and, by calling std::swap, it will swap the pointers if you call it wi... (by jonnin)
Read files, with recursive search
 
I made a program within an api framework that searches a known folder for .m3u files, it then reads the m3u line by line and if it finds a string that the user ...
[6 replies] Last: Thank you thank you thank you, I'd have never of got there, great comm... (by lostdog)
Template Metaprogramming Is Evil
 
So... I’m stumped. What am I doing wrong? // Compile with C++11 or better #include <iostream> #include <set> #include <type_traits> #include <vect...
[15 replies] Last: C++20 makes it less of an eyesore template<typename T> concept HasCo... (by Cubbi)
Delete not Deallocating
 
I have this code. The delete function (line 7 and 12) isn't freeing up memory assigned with Triangle3D *triangles = new Triangle3D (line 17). My RAM usage...
[8 replies] Last: >http://www.eelis.net/iso-c++/testcase.xhtml (specially point 6) I c... (by flamer3d)
Combining/Integrating 2 Solutions on Visual Studio for C++
 
Background of my situation: I need to automate a measuring procedure so there is a sensor and moving stage. Each equipment comes with its own sample code and th...
[2 replies] Last: Hi destinyplan, did you also post this on StackOverflow? https://stack... (by Ganado)
Remove gradebook name
 
I have this code that uses gradebook and student files to create a gradebook and stores student names and grades. When launching the file is asks for a name for...
[6 replies] Last: Nothing in your code declares anything called gbook . On line 9, you... (by MikeyBoy)
October 2019 Pages: 1... 8910
  Archived months: [sep2019] [nov2019]

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