General C++ Programming - December 2016 (Page 18)

Tinkering with some project ideas, would love feedback and suggestions
 
So in my computer graphics course I have a project offer to hand in soon and I've had a few ideas but from where I stand its hard to see what is the difficulty ...
[3 replies] Last: So the first idea is a near-light-speed simulator, in which I expect ... (by mbozzi)
Strict weak ordering implies ordering is not defined for all elements?
 
Hi, I have found in http://sidd-reddy.blogspot.be/2011/01/i-was-going-over-c-stl-when-i-noticed.html that strict weak ordering implies incomparability, i.e. ...
[1 reply] : there exists elements in its domain where neither cmp(a,b) nor cmp(b,... (by Peter87)
return multiple pointers
 
Hi, im trying to pass and return two pointers or effectively two different types of arrays from one function to another. I went through tuples but they can pass...
[2 replies] Last: Multiple value return is awkward in C++: Ex: T a; U b; std::tie(a, ... (by mbozzi)
Need help turn recursive functions into non recursive functions
 
I Have this program that inserts a text file into linked list and sorts it using merge sort. But for the larger text files I get a stack overflow error. So I ...
[no replies]
Hangman game
 
You are making a hangman game that the user can play. To represent the hangman character, you can use any symbols you like. Your program will read in an input f...
[no replies]
Merge Sort Problem
 
I have several text files and I will read through one them and insert each line in linked list. Then I sort the linked list using merge sort. And it works fin...
[no replies]
string::find() returns -1 when comparing input string to string in binary tree
 
Hi, Given an input string - named "strIn" - I need to find a string in a binary tree that begins with strIn. To test my code, I inputted "SAN", which sho...
[5 replies] Last: @cire: You're right. I found the reason why the code didn't work for m... (by moonman239)
by stav
[SDL] error when deleting window?
 
why cant i delete the window* i got from SDL_CreateWindow() in my class destructor? i wanna release it from the heap but its not allowing me? is it because...
[4 replies] Last: thanks (by stav)
by KVin
CAN
 
123
[4 replies] Last: Please do NOT delete your posts once you've got an answer. It makes t... (by MikeyBoy)
What are the relative speeds for the different actions on standard containers?
 
Hi, I am looking for a summary comparison of the standard containers as to the different actions (such as: insertion at certain position, deletion at a certa...
[1 reply] : Have you tried a websearch with "c++ standard library container comple... (by keskiverto)
function values
 
The question is does the function setPixel looks correct? What values parameter value from function setPixel takes? can somebody give me an example? / /Class C...
[1 reply] : I don't think you should allow x == Image::getWidth() or y == Image::g... (by Peter87)
Removing Duplicates in random set of numbers
 
The purpose of this program is to generate 10 sets of 6 random numbers and remove any duplicates in each set. I'm not too familiar with arrays so I'm having tro...
[2 replies] Last: What do you mean by "no duplicates"? A) Each set has 6 unique values o... (by keskiverto)
by miglr
help with using strlen function
 
I need to use the strlen function to get a total # of characters. when I run the program I get 1 for the number of characters. what am I missing? // C++ prog...
[4 replies] Last: as part of the lab it asks to use the strlen function to get a total ... (by Chervil)
delete duplicated words with at most 20 characters
 
I would like to write a programme to remove the duplicate words with at most 20 characters in a passage inside a txt file with at most 1000 words and the no. of...
[2 replies] Last: Sorry that i can only use the library of iostream, fstream , cstring, ... (by book52020)
My Merge Sort is too slow!!
 
Hello, No matter how much I try, my Merge Sort is incredibly slow, let's forget comparing it with std::sort. I have tried to pinpoint the problem, but I can't ...
[16 replies] Last: It seems OP has closed his a/c ;) but the rest of us can still learn f... (by gunnerfunner)
by miglr
having trouble displaying elements of an array
 
Hello I'm having trouble displaying the contents of an array. Heres my code and I cant seem to find the problem // C++ program to fractions #include <iostr...
[6 replies] Last: Thanks a bunch for the feedback fellas. @keskiverto it was deliberatel... (by miglr)
Discerning between ASCII and binary STL files
 
My program accepts STL (the 3d printing type) files, and currently works with the ASCII type. I would like to create a process that identifies the file as eith...
[3 replies] Last: On Unix-like systems, libmagic offers a way to do this. It's how f... (by mbozzi)
Having issues splitting/formatting a string into a vector based on multiple criteria
 
I need to split a series of strings that are formatted like this: ex string 1:<verb> sigh <adverb> ; portend like <object> ; die <adverb> ; ex string 2...
[1 reply] : Extract the first element, and then use the given split function to sp... (by JLBorges)
December 2016 Pages: 1... 161718
  Archived months: [nov2016] [jan2017]

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