General C++ Programming - September 2014 (Page 21)

Code::Blocks doesn't recognize C++11 !!!
 
I'm trying to use c++11 std::thread, including <thread> header, but it says this: error: 'thread' is not a member of 'std' I checked the flag -std=c++11 in ...
[2 replies] Last: The default codeblocks compiler doesn't support std::thread (by Yanson)
by DevTK
Virtual & Template method
 
I have the same implementation for 2 methods, they both insert argument to a text file. void WriteToFile( double content) //for double { streamFil...
[5 replies] Last: One can do the other way too: class base { virtual void write_impl(... (by keskiverto)
Help with 2 dimension array of char
 
#include<iostream> using namespace std; int main(){ int size_col = 12; int size_row = 12; char months_array = { "January", "February", "Ma...
[7 replies] Last: I'll take just some bits: check_low = rainfall_array ; int lowestMont... (by keskiverto)
Building a simple program? Help with output
 
I am building a simple program that finds the average of three grades. The program runs fine. But, I am trying get my answer stored in fixed point notation with...
[6 replies] Last: Shouldn't it be cout<<std::setprecision(2);?? I don't know, I've nev... (by TheBeardedQuack)
by Gyiove
Creating costom function param header and passing that.
 
Hello cplusplus forum, I have this here: int *funclist; int func_count = 0; void push_func( int func ) { if( func_count == 0 ) funclist = new int ; ...
[8 replies] Last: > Basically i want to create a dynamic function params header i guess.... (by JLBorges)
Matrices #2- Please Help Fellow Programmers!
 
#include <iostream> #include <cstdlib> #include <iomanip> using namespace std; char menu(char); int row, col; int main() { int temp; char op, se...
[3 replies] Last: Arrays other than one-dimensional are a bit tricky. There are third-p... (by keskiverto)
Cannot access private member declared in one class BUT I can in another class (1,2)
 
So I have an ImageManager class, Board class, and Box class. In Board.h I can declare ImageManager imgr; and in Board's constructor I can use imgr and its fun...
[26 replies] Last: Passing by reference is efficient for anything larger than primitive t... (by LB)
Which is Best Encryption Algorithm
 
Hi, I am working client server data transfer project. I need one help for encrypt and decrypt the data. Which encryption method is best? is unbreakable? Why ...
[1 reply] : https://konklone.com/post/why-google-is-hurrying-the-web-to-kill-sha-1 (by mutexe)
MD5 Encryption and Decryption
 
Hi, how to do encrypt and decrypt the text by using md5 algorithm without using the any library? Only implement in c++ program.
[4 replies] Last: Thanks guys. i understand the md5 hash algorithm (by gopal2773)
by fang2
Need tutorial on writing this program please
 
I have to do this program on Visual studio. Some help would be appreciated please: Write a program that prompts the user to input a four-digit positive inte...
[6 replies] Last: Won't this work?? #include <iostream> int main() { int n = 4; ... (by avadhootp)
Using resources in executable.
 
i have seen a lot of programs that have images inside their exe, dont use external ones. I tried to add image in my codeblocks project, but trying to use it fai...
[2 replies] Last: Personally i use windows, but i want a cross-platform answer (if it is... (by hakeris1010)
by Kubani
How to make a shape outside of main()
 
Hi, I know how to define a shape and attach it to a window as follows: #include <Simple_window.h> void cir() { Circle c(Point(100,100),50); } int main() {...
[4 replies] Last: That answer is a kind of else question! Also (as I said) I want use of... (by Kubani)
Matrix Operations - Help !
 
#include <iostream> #include <cstdlib> #include <iomanip> using namespace std; char menu(char); int main() { int row, col; float A , B , C ; ...
[3 replies] Last: never mind, i found the problem. Thanks so much ! : )) (by MazharMustapha)
by sebz92
duplicate array
 
hello all, I'm trying to duplicate a string array. i created a function called duplicate but, when i run it, it gives me an error... what is wrong with it? ...
[3 replies] Last: The duplicate is completely independent of the original. First string... (by Chervil)
Time
 
I need a method of syncing time between server and client for udp packet timestamps that are accurate to within 10ms. I know about ctime, and other such libs...
[3 replies] Last: > wouldn't it be possible if you used an external source for atomic cl... (by JLBorges)
Problem with abstract classes and inheritance
 
I am having a problem with a set of inherited classes and I cannot figure out why. Here is the relevant code (with class names changed). (Each separate code f...
[4 replies] Last: You should use public inheritance, but I guess that is just another m... (by primem0ver)
by shoqi
Multi dimentional Arrays.
 
Write a program to enter data into a table and display on the screen in tabular form. Please check my code below. I want to know where are the errors. Thanks i...
[3 replies] Last: Could you copy and paste the exact errors you are getting? (by LB)
Low level callback hook issue
 
static LRESULT CALLBACK kbProc(int code, WPARAM wParam, LPARAM lParam) { if (code >= 0) { kb = reinterpret_cast<PKBDLLHOOKSTRUCT>(lParam); vkCode = k...
[3 replies] Last: Oh my god why no reply? (by UniqueZ)
by nicow
std::forward : 'forward' is not a member of 'std'
 
Good evening everybody, I am pretty new to C++, and still seem to be very attracted to pitfalls. Inspired by this article(http://enki-tech.blogspot.ch/2012/0...
[3 replies] Last: > It now turns into an error if I explicitely add -std=c++11 It sho... (by JLBorges)
Get out from loop
 
Anyone know how to get out from loop. I mean when we press -1 value, it stops. #include<stdio.h> #define CD 0.05 #define LD 0.06 #define MD 0.07 float Ge...
[1 reply] : Please, use code tags and informative indentation. See http://www.cplu... (by keskiverto)
September 2014 Pages: 1... 1920212223... 28
  Archived months: [aug2014] [oct2014]

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