General C++ Programming - February 2014 (Page 23)

[Peer Review] - GLUT bypassing global idle function limitation
Before I go gung-ho on this tangent, I'd like some feedback. Basically, my beef with GLUT is that the idle callback function is global and cannot be assigned...
Feb 10, 2014 at 1:03am
[no replies]
Random number
I cant compile this code as Im at work and the computers are security protected, So i''l have to wait until i get home to test this, but im pretty sure im wrong...
Feb 10, 2014 at 12:09am
[11 replies] Last: but think in this case it's not c++ but math :) (by Chriscpp)
big numbers, big runtime
I would still consider myself a beginner, but I was trying some of the middle Project Euler problems (at least those that looked doable for me), and I'm having ...
Feb 9, 2014 at 11:47pm
[1 reply] : Since the brute force approach is going to take that long I doubt that... (by Plover)
Build Errors on the following code
I get build errors when trying to compile the following: #include <iostream> //Define a struct called AdvertisingIncome struct AdvertisingIncome { i...
Feb 9, 2014 at 11:23pm
[2 replies] Last: ah yes not a good idea not sure why I put those there! Thanks. (by superdaz83)
Websockets + C++
So, I've already learned in school how to program in C++, and I know a bit about OO programming and all, but I'm together with a couple of friend trying to comp...
Feb 9, 2014 at 10:17pm
[4 replies] Last: Thank you all for your help :) it really does help, now I just got to ... (by MNoronha)
by Gyiove
fread of fwrite have problem with line char '0a' (half line char)
Hi! Im trying to write and load file to from unsigned char vector but there seems to be problem with new line char. code: void fg_readfile( char *fname, vec...
Feb 9, 2014 at 10:13pm
[2 replies] Last: Thanks! I now readed writed file like this: f = fopen(fname, "wb"); //... (by Gyiove)
by xkara
dynamic allocated arrays c++
I'm trying to create a function that uses dynamic allocated arrays instead of vectors because I want to see how they work. Basically, this function asks the use...
Feb 9, 2014 at 10:03pm
[1 reply] : You should use std::getline() to read the line, rather than operator>>... (by kbw)
Hashing
Hello, can someone help me with a program to implement hashing of text files in a directory to find files with the same content?
Feb 9, 2014 at 7:17pm
[1 reply] : If you want to learn about popular hash algorithms (such as MD5 and SH... (by Catfish666)
by spk
How to make a long time periods if/while statement
Hi everyone, I started a new project and I have some little problems I'm making a program that would run 24/7 and that could be run on multiple computers that a...
Feb 9, 2014 at 6:53pm
[7 replies] Last: Thank you a lot, that's perfect, very helpful. (by spk)
Winsock error for no reason?
I've been leaning how to do multiplayer stuff with a library called Enet and Allegro. Today I decided to work on it some more. When I tried to run it, it gave m...
Feb 9, 2014 at 5:26pm
[2 replies] Last: Oh wow nice simple solution. Thanks! (by Bingocat4)
by divide
atomic float add ?
Hi, I'm desperatly trying for a week to add one float (at some place in memory) onto another float (at some other place), in an atomic way. Meaning, multiple...
Feb 9, 2014 at 5:19pm
[10 replies] Last: > won't handle cases where my float is a very large number, or a very ... (by JLBorges)
Pausing Your code (Examples included)
So here is a problem i'm facing. And i researched it a little bit but probably not enough. When you run a simple program in visual C++ 2010 it will run strai...
Feb 9, 2014 at 3:39pm
[2 replies] Last: 1) Remove any code that pauses your program 2) Right click on your pro... (by Disch)
c-style string array and pointer
I was told that if I define char *cstrp; char cstra ; then the cstrp can be treated as cstra, and so I can also use cin>>cstrp; but when I write the fol...
Feb 9, 2014 at 3:36pm
[7 replies] Last: Some reading for you: http://www.cplusplus.com/faq/sequences/strings/c... (by Duthomhas)
GMP Fixed Bit Size Integers
Hey! I've recently familiarized myself with GNU MPFR and GNU MP (arbitrarily large number libraries). So far, I need a specific requirement that I can only see...
Feb 9, 2014 at 2:18pm
[no replies]
Accessing Objects within another object
I'm currently trying to access a variable contained within a base object from another completely different object and I continually get error messages. I'll a...
Feb 9, 2014 at 1:50pm
[10 replies] Last: I put the variable in the public part of the class and it works. How c... (by masschamber)
Loop question
#include "stdafx.h" #include <iostream> using namespace std; void func(void); static int count = 10; int main() { while(count--) { func(); ...
Feb 9, 2014 at 12:16pm
[4 replies] Last: What do you mean? What is the conditional statement? The conditional... (by MikeyBoy)
ARRAYS(two dimensional)
How will you code a program that displays the maximum value in a two dimensional array of integers. the program will ask the user to input the 4x5 array? i k...
Feb 9, 2014 at 11:02am
[4 replies] Last: thanks! <3 (by daillem)
Squaring in For Loops
I need to make a for loop without : using the math functions like pow, sqrt, etc. or an if-statement. I can only use the basic arithmetic functions like +,-,*...
Feb 9, 2014 at 10:13am
[1 reply] : Squaring means you multiply the number with itself (not with 2). (by Peter87)
Help! What would be the coding for this?
I'm a senior graduating and I waited so long to take C++! My workload is a little ridiculous and I have a pretty good understanding of C++ and how to write out ...
Feb 9, 2014 at 8:39am
[3 replies] Last: Here's the link to the actual problem: http://web.njit.edu/~kapleau/te... (by christofuh)
Communicate within in the same host through sockets
Hi All, I am new to socket programming and wondering if we communication is possible within the same host through socket programming(though there is no nee...
Feb 9, 2014 at 8:29am
[no replies]
February 2014 Pages: 1... 2122232425... 33
  Archived months: [jan2014] [mar2014]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.