General C++ Programming - January 2012 (Page 22)

Program Running Correctly in Compiler, Not As Executable
 
Strange issue involving Code::Blocks. As most everyone will know, while you are working on a C++ project in CodeBlocks, the compiler automatically creates an ex...
[3 replies] Last: Thank you, guys. That's really an annoying problem, but it seems quite... (by Kycudaj)
by PT4TB
linker settings and search directories
 
Hello, I have a question: When you keep unnecesary search directories in your compiler settings, do they add to the size of your program, or do they make i...
[4 replies] Last: Sure, Cheers for your help =) (by PT4TB)
Dynamic Arrays
 
What are dynamic arrays ? can you give me some examples ?
[2 replies] Last: http://cplusplus.com/doc/tutorial/dynamic/ (by hamsterman)
Servers/sockets
 
Hello again! I am wondering how to make a server. I know I can do this using Winsock, however I cannot find a good website for this. If anyone could point me...
[2 replies] Last: Thanks, looks useful! I will defiantly will try this out! (by KyleMiles)
Computer factorial numbers/Functions
 
I've been reading C++ without fear 2nd edition. And I'm stuck on one the part about functions. The goal of the exercise is to create a program that calculates t...
[1 reply] : Well that particular code uses a recursive function (a function that c... (by closed account o1vk4iN6)
RSVP
 
i initially started the program on turbo c++ but i have to switch to visual studio it would be helpful if anyone could tell me whether the following header file...
[3 replies] Last: You should use this in C++ #include <iostream> #include <conio.h> #i... (by Galik)
function templates and lambdas
 
Hi, I tried to use a function template to encapsulate a lambda expression in order to call it recursivly. It turned out I wasn't able to use "=" as lambda...
[3 replies] Last: Thanks. That clears it up very well! (by diver182)
Pushing the output of two programs as input to another program?
 
Hello, I'm willing to use either C or C++ to solve this problem (Which ever is better to use) and I'm doing this on a Windows XP platform. I plan on having two ...
[1 reply] : Hmm, I think in Windows too, they are called pipes. http://msdn.micr... (by Pravesh Koirala)
by ftg
How to design that?
 
Hi everyone, I have a small design issue. I have a class A observing another B that is connected to an XMPP server. A waits for B signals. So far no prob! ...
[4 replies] Last: > In fact, i did'nt reallly want to design a pair observer/observable.... (by JLBorges)
What are sideeffects in this code?
 
int main() { int& test = *new int; delete& test; return 0; } are there some sideeffects by using this approach? or why would that be bad approach...
[4 replies] Last: nice example :D thanks. (by codekiddy)
Day, Time
 
Was making a project for the 12th Standard and I actually was making a ticket booking portal kind of thing so I wanted to extract the current day (i.e. Sunday, ...
[2 replies] Last: Thank you will try it out! :D (by Pranav Singhania)
How could i perform sorting in 2d array
 
How could i perform sorting in 2d array.For eg 2d array is int arr ={(23 34 45 5),(22 44 55 54)} Please help me i need urgent help.....
[1 reply] : Sorting is only obvious in 1d arrays. There is a billion ways to sort... (by hamsterman)
by Tresky
Data Structure to Store a Map
 
In the past, I have stored all of my maps inside of multidimensional vectors, but I find it too irritating to work with. I recently tried to use a std::map, but...
[4 replies] Last: Okay thank you. :) (by Tresky)
Why doesn's this compile?
 
#include <iostream> #include <iomanip.h> #include <time.h> int rollDice(); int main () { enum Status{CONTINUE, WON, LOST}; int sum, myPoint; Stat...
[4 replies] Last: I am using the compatible version of gcc for mac os 10.6.8. (by andrewwiles1994)
by jorgen
Two programs accessing the same file
 
Hello! I just realised that I was running two c++ programs at the same time accessing the same file (one writing and one reading). I'm not positive they are ...
[3 replies] Last: Why don't you use a mutex ? This way, access to the file will be ser... (by modoran)
by zepher
Need help dechunking a stream
 
Hi All, Can someone please help me to dechunk a binary stream I received from a webservice. I basically connected a TCP socket to the webservice and sent it...
[1 reply] : Aha, I found my issue. I was decoding the chunk_size as the binary h... (by zepher)
Missing Segmentation Fault
 
I thought that dereferencing a NULL pointer would ALWAYS cause a segmentation fault, but when my program (running under Ubuntu OS) executes this line of code ...
[1 reply] : There is no guarantees what will happen when you try to dereference a ... (by Peter87)
translate 0-9999 into english
 
i'm wondering how would you translate a number from 0-9999 that the user enters into an english statement for ex: 123 is one hundred twenty three. 5041 is five ...
[5 replies] Last: http://www.theprogrammersdiary.blogspot.com/2011/12/converting-numbers... (by Pravesh Koirala)
random number in array
 
Hi, I want to write a function that takes the array size as parameter, and genereates random number as elems b/t 0 and twice the array size, but it's not workin...
[3 replies] Last: You should only call srand once at the start of your program and never... (by LB)
by LB
Confused about pointer adding/subtracting
 
I am very confused.                                                               Output: int a ;...
[2 replies] Last: Oh, huh - I guess I got really lucky on both computers >_< Thanks! (by LB)
January 2012 Pages: 1... 2021222324... 36
  Archived months: [dec2011] [feb2012]

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