General C++ Programming - November 2011 (Page 34)

Tree
 
Hello,
[1 reply] : Your Node class looks exactly like a binary tree's node except it has ... (by webJose)
by squik
Problem with dates and years
 
/* Write a program that checks the validity of a date. The date is entered as separate numbers for the month, day and year. For example, if the date was Mar...
[6 replies] Last: With Some modification : #include <cstdlib> #include <iostream> #in... (by bluecoder)
Is for(;;) bad?
 
Is using for(;;) { //code } considered bad programming practice, even if it is possible (in the code) to break out from the loop inside the loop?
[12 replies] Last: The advantage (as Stupebrett hinted) is that by using in-loop breaks t... (by Gaminic)
ant colony optimization
 
I have to prepare a report on ant colony optimization in 2 or 3 days.please tell me more about ant colony optimization in a broader way except wikipedia???? ple...
[1 reply] : Please don't double post: http://www.cplusplus.com/forum/general/54487... (by Stupebrett)
by trojsi
Cannot pass string to function
 
Hi, below is part of my code for a simple Hangman Program which generates a random number and selects the word from a text file. This word is put in a string wo...
[3 replies] Last: Hi , for(int w = 0; w < iSecret; w++) { getline(f, matchWord); ... (by bluecoder)
by jove
problem with makefile when using threads
 
Hi people I have a small program that using the new thread Library that looks like: http://pastebin.com/h5xvJBjt I can compile it with using gcc/g++ 4.6.2 o...
[no replies]
by eJonny
return with 0xff in <stream>::underflow()
 
Hi. I am trying to implement a stream to decode base64 on-the-fly from another stream. To do this I created a new class derived from std::basic_streambuf<cha...
[1 reply] : A night of sleep solved the problem. In my special case I have to cast... (by eJonny)
by ledien
Leak memory.Can anyone help me!
 
#include<iostream> using namespace std; #ifdef _DEBUG // test memory leak #define _CRTDBG_MAP_ALLOC #include <crtdbg.h> // UIDEBU...
[2 replies] Last: Thanks. (by ledien)
Problem with window size on diffrent screen resolutions
 
Hello! I'm beginner in programming with c++ and I have a really annoying problem. I programmed a program in c++/cli. Well, untill here everything seems like t...
[3 replies] Last: Use below on loading of form [if you interested] adjust your component... (by richardforc)
How to move items off a list and onto a queue or stack
 
I have written a code to push things off a list and onto a queue or stack til the list is empty. The programs compiles and runs but it is not executing as it is...
[4 replies] Last: Oh, I definitely did not catch i missed that step. Thank you for helpi... (by itsjuzme)
Union a super class variable
 
Is it possible to do a "union" of a protected variable from a parent class? I would do a template but it makes it impossible to use as a pointer. So I was wonde...
[5 replies] Last: Well, a pointer's a pointer so once you've assigned it, they're pointi... (by shacktar)
Having trouble with casting: (int)
 
Hi-- I have 2 doubles x and y. When I divide x/y I dont get the result I am hoping to get. Here is the printf command I am using and the output I am getti...
[2 replies] Last: I see. Thanks very much. (by duggarm)
.Exe file wont open?
 
Hey, I've got this strange problem where my .exe file just wont open, theres no error it just doesnt do anything. I've got other codes where the .exe file works...
[3 replies] Last: http://www.cplusplus.com/articles/iw6AC542/ (by Duthomhas)
by phoemi
Lambda: scope where defined, rather than where called?
 
Really? Should gcc 4.7.0 be saying "number was not declared in this scope"? Are lambda's only allowed to see what's in scope where they are defined rather t...
[2 replies] Last: Lambdas are syntactic sugar for automatic generation of functor types,... (by helios)
Program help
 
Here is my project: Write a program that dynamically allocates an array large enough to hold a user defined number of structures (string name and three double ...
[2 replies] Last: while (numTestScores < 0) { cout << "Please re-enter a positive numbe... (by Danny Toledo)
Sorting Alphabetically ??
 
Hi, I needed some help with something I have been trying to code. So the program I want to make asks for a number of people. Then the user enters the names o...
[3 replies] Last: As an aside, re general naming of variables, types - using logical nam... (by jim80y)
My form is declared but its not compiling.
 
Hi Ive been haveing problems with opening new forms. The problem is I have been using the same code to open for for a while now and it has only recently st...
[1 reply] : Also here's my code: #pragma once #include "Q1.h" namespace SOSEQ... (by Hamish Claxton)
C-XSC
 
Opa pessoal.. tou tentando executar o codigo abaixo usando a biblioteca c-xsc: #include <stdio.h> #include "interval.hpp" using namespace cxsc; using ...
[1 reply] : Although I probably can't help you, let me give you an advice (or two)... (by eypros)
by JovanD
ifstream File*.txt
 
Hi, Is it possible to use ifstream to sprecify loading a file called Filev2*.txt (the * part will vary with different version numbers) The closest to what...
[9 replies] Last: If you want a Windows app to always look for it's config file in its o... (by andywestken)
undefined symbol kbhit() and printf()
 
prototype of a function in c++ is mandatory to give.........but when we give the prototype of the function then there are alot of errors..... see ex int...
[3 replies] Last: There is no such file as <cstdio.h>. All the ones I listed for you are... (by Duthomhas)
November 2011 Pages: 1... 3233343536... 47
  Archived months: [oct2011] [dec2011]

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