General C++ Programming - April 2016 (Page 6)

Non-Preemptive Priority Scheduling problem !?
 
my input file text : 6 1 0 yellow 2 1 red 3 1 green 4 2 urgent 5 3 green 6 4 red my code until now: #include <iostream> #include <fstream> #include <s...
[1 reply] : Well the first thing I see is that both sortbyarrival() and sortbyprio... (by dhayden)
how to make transposition cipher more secure
 
how to make transposition cipher more secure ? by adding more than one round of transposition under the same key? please advise.
[4 replies] Last: Thanks it helps a lot :) (by nelson0078)
by ayati
subject: use deduced function template return type for a type definition
 
Hi everyone, I want to define the value and the value_type of a certain class template. I have the following portion of code, #include <iostream> #inc...
[2 replies] Last: Hi JLBorges, this is what I have been looking for, thank you very much... (by ayati)
How to pass an array to function as a perimeter .
 
I want to pass an array to function which further make changes in an array and it will have to return that array through that function. I forgot syntax anyone c...
[2 replies] Last: You should probably pass the number of elements in the array too: int... (by dhayden)
by j65168
-std=c++11 Error while compiling
 
Hello, Could you please refer to the code below and guide me as to how that error could be resolved? ///Listing 2-1 ///A program that checks that the n...
[3 replies] Last: I stand corrected. Thank you, Peter87. (by JLBorges)
var and &var
 
"why is the sky blue" question. If both var and &var are referring to the same memory location, why is var passed to function parameters and handled differentl...
[8 replies] Last: @ Corecplusplus When writing this tutorial I had a lot in mind so s... (by TheIdeasMan)
Parameter???
 
I'm finding arguments and parameters difficult to distinguish, can someone help? Is this parameter? If not how do I turn it into one?? #include <iostre...
[4 replies] Last: @ Corecplusplus I mentioned this at length in another post, but I w... (by TheIdeasMan)
Trouble making localtime_s work
 
I have the following code snippet: #define __STDC_WANT_LIB_EXT1__ 1 #include <time.h> . . . std::string TimeStamp() { #ifdef __STDC_LIB_EXT1__ ...
[9 replies] Last: More C++14: #include <iostream> #include <string> #include <chrono> ... (by JLBorges)
by als
Implementing move constructor and assignment with unique_ptr<>
 
I am running on Windows 10 in Visual Studio 2015, using this library for BTSerialPortBinding: https://github.com/Agamnentzar/bluetooth-serial-port I have the...
[3 replies] Last: > Exception thrown: read access violation. > std::_Unique_ptr_base<bl... (by JLBorges)
by Bite7
Implementing quick-sort into stack
 
This is my code, I just really don't understand what I'm missing #include <iostream> #include <time.h> #include <windows.h> using namespace std; templ...
[no replies]
SDL_Rect and 2 dimensional arrays.
 
Hello guy , i am trying to create w breakout clone using SDL 2 C++. the thing is i got the paddle moving and got the ball bouncing around the screen. Note that...
[1 reply] : Why does it have to be a 2D array? Just use a vector and draw each ele... (by helios)
Configuring SMFL
 
Am using code blocks and i have downloaded da smfl archive and the instructions at its website but i have failed it brings an error of some smfl dll files missi...
[3 replies] Last: Yason thanks but more errors caming up now how will resolve Entry po... (by novapack)
Arrays and reading them in reverse, please help!
 
Writing a program that holds an array of my name read in from the keyboard and display it backwards. the code im using is: #include <iostream> using na...
[2 replies] Last: Thank you sooo much!! (by ashley21466)
Please help writing a with arrays, 20 numbers read forwards and backwards
 
Im trying to write a program that holds an array of 20 numbers read in from the keyboard and display them backwards. this is what i have: #include <iost...
[no replies]
by AcarX
Fastest way to get different elements between vectors
 
I have 2 vectors which I'd like to retrieve different members as such: (in_vec1 && not_in_vec2) (in_vec2 && not_in_vec1) Performance is a concern s...
[2 replies] Last: Thanks I'll implement and use that one. (by AcarX)
Lottery code won't work!
 
javascript:tx('code')javascript:editbox1.editTag('#include<iostream> #include<string> #include<ctime> using namespace std; int main() { int num; srand(tim...
[no replies]
Troubles deleting dinamically allocated char array
 
Hello. My friend sent me his class for a String: class EString { char* alphanumerics; int size; public: /* CONSTRUCTOR */ EString(char* mystring) { ...
[4 replies] Last: Thanks man! (by gedamial)
Function Templates
 
Hi, I need some help with function templates - specifically implementing the complex and date classes into the code.. Here is the assignment: Write a simple ...
[1 reply] : You can use the Complex class http://www.cplusplus.com/reference/compl... (by Thomas1965)
by tk13
Text message decoder (loops)
 
Get a line of text from the user. Output that line. Then output the line again,this time expanding all of the found common text message abbreviations. You can d...
[5 replies] Last: std::basic_string::at returns a reference to the character at the sp... (by xismn)
help mi set up STMP in code::blocks
 
I want to start using smf
[no replies]
April 2016 Pages: 1... 45678... 23
  Archived months: [mar2016] [may2016]

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