General C++ Programming - November 2014 (Page 24)

char to hex help
 
Having trouble converting char to hex. according to here http://www.asciitable.com/ ô in decimal is 147 and print ô using alt 147 and here http://www.ascii...
[2 replies] Last: thanks bro that worked! you're the best (: (by ShinAngel)
Need help for two dimensional array with vector
 
#include <iostream> #include <cassert> #include <vector> using namespace std; vector<int> flatten(int a ) { vector<int> v; for (int i = 0; i < 100...
[4 replies] Last: Inspired by a thread http://www.cplusplus.com/forum/general/147137/ t... (by prestokeys)
std::array<T> vs C style array performace
 
I'm implementing a container with special access to its elements. Under the hood I store the elements in a std::array<T> . Since the project that I'm working o...
[4 replies] Last: @jib - max_size is likely implemented like so: template<typename T, ... (by closed account 3hM2Nwbp)
"::ctime" has not been declared (SFML + C++11 in Code::Blocks)
 
I started a project and I'll use SFML and threads. When using sf::Thread, everything is fine. When I tried to add C++11 (I didn't even change the code!), <ctime...
[2 replies] Last: No, it's wrong. Just ctime messing up. :| (by iQChange)
how to draw lines with different colors
 
I want to write a function called DrawLineSegments.This function must change the color of lines at every corner where the corner angle is greater than 60 deg (A...
[1 reply] : I'm not at a PC right now, so no code, but you can write it really eno... (by Duthomhas)
Whats wrong?
 
Show how to implement the main queue functions Enque() and Deque() using two stacks S1 & S2 You allowed only to call push () and pop() functions of the two s...
[4 replies] Last: nope actually the code is just a try of mine (which failed) the proble... (by Ali Tamim)
Assignment Operators
 
Does anyone know how to implement these header declarations? Set(Set); // Copy constructor operator=(Set s); // Supposedly assignment operator Also, the d...
[1 reply] : Set::Set(const Set& rhs) { /// do copy } ///...or if the copy constru... (by closed account 3hM2Nwbp)
Read from txt to vector
 
Hell there, What is up? void Equipa::alocaDirector (istream &isV){ string _name; string _age; string _country; while (!isV.eof()){ getline(isV,...
[6 replies] Last: Any help guys? Deadline is tomorrow and I really need this. (by Verance)
HELP
 
I CAN'T FIGURE OUT WHATS WRONG WITH THIS PROGRAM. ANY HELP APPRECIATED. /* * File: fillShapes.c * This program outputs a filled version of a shape that yo...
[1 reply] : Why do you think there's something wrong with it? Can you please use ... (by kbw)
Stacks. C++
 
Thanks
[1 reply] : If by stack you mean std::stack or if the stack has a properly impleme... (by Peter87)
stack implementation by struct?
 
can someone just tell me how this code actually works, and how can i let the user enter numbers, which will display in LIFO ? #include <iostream> using nam...
[no replies]
Ignoring negative values in array
 
I need to ignore negative values in an array, but not exit the function. For example if the user enters: 1,2,3,4,-1,-2,0 the array would be [1,2,3,4] Is ...
[1 reply] : #include <iostream> std::size_t read_positive( int* array, std::size... (by JLBorges)
by zakels
Inserting user-input string to an array
 
I'm trying to code the program that will store item data. And I'm having problems to receive user-input string to array. Please help. I've been searching to f...
[6 replies] Last: Ha ha I figured it out. InfinityCounter was right. Somehow I thought... (by zakels)
C++ Help
 
a. Write a function to judge two lines in the coordinate system being parallel, perpendicular, or regularly intersected. Use the slopes of the two lines as th...
[5 replies] Last: The three cases need to be a 3-way if/then/else. Note that I've also ... (by dhayden)
having hard time with a few functions
 
part A void student_data() { } part B void findHighestScores(int) { } I need some help trying to write a function for part a a...
[1 reply] : Alright let me try to understand what you wrote. I am just going to go... (by InfinityCounter)
Mario Sunshine paint effect
 
Always more theory based questions to see how people would do things! What do you guys think would be the most efficient way to code the paint mesh as seen all...
[6 replies] Last: Right, I think the images are 512x512 and there are several for each "... (by Hippogriff)
by a k n
Cryptographic security of std::random_device
 
Is it safe to use it for cryptography purposes say generating a salt ? std::random_device::entropy() gives 0 on my system (g++ 4.8) as well as here(http://col...
[4 replies] Last: Okay , thanks . (by a k n)
Initializing n-dimensional std::array with a list of components
 
InitializeNArray<4, bool, NARRAY>()(narray, {1,2,3,2}, true); is supposed to initialize a 4-dimensional std::array a with a = true. The commented-out li...
[7 replies] Last: Thanks for your explanation. Here is the full solution to my original... (by prestokeys)
by sebz92
sort a string array alphabetically
 
hello, i wish to sort a string array alphabetically and im not sure if i am doing it right. for example: string a ; //initial array string b ; //sorted...
[2 replies] Last: wow it worked. that was so simpleee !!! thank you very much! (by sebz92)
Cone Volume Calculator program
 
I'm working on below program and I want the program to do the same thing, but with not one main() function, but instead one main() function PLUS one user define...
[6 replies] Last: Thanks NT3 for the solution. However, I cannot use a 1 anywhere since... (by learner1234)
November 2014 Pages: 1... 2223242526... 32
  Archived months: [oct2014] [dec2014]

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