General C++ Programming - January 2010 (Page 6)

Nested class' function: implementation code
 
Hi C++ folks, I can implement a function inside a nested class as follows: class A { struct B { void f() { //impl code here; } }; }; or ...
[6 replies] Last: The problem solved. To summarize: class A { struct C; // defin... (by Robertlzw)
Using Arrays Function Having problem completing it Solve it for me :D
 
#include <iostream.h> int main() { int grade ,sum=0,average=0,max=0; int min=0; for (int i=0;i<10;i++) { cout<<"Enter grade"<<(i+1)<<" "; cin>>grade...
[2 replies] Last: sorry for the double post its and emergency :D (by akosinoah)
by Nikhar
Kindly Suggest Algorithms for the following programs.
 
Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an alg...
[15 replies] Last: Ok. Thanks Jsmith. Now, this was more easy to understand. :) Btw, K... (by Nikhar)
by Nikhar
Whats wrong with the following Dijkstra?
 
Hi guys, I made a graph class and the following is a program that applies dijkstra algorithm. The program is quite big but it is easy to trace the dijkstra func...
[2 replies] Last: Ok....Thanks. Now, I know one thing f setting something to infinity. (by Nikhar)
by wol
Template question
 
Hello, I have a problem which seems to be related to templates. Consider the following piece of code: template<class T> int DataHelper::filter(std::vecto...
[6 replies] Last: NGen wrote Also, your function call is incorrect. int filteredOu... (by poet)
Class prototypes, Trouble with more than one include file.
 
I'm trying to build a small 2D game engine on my own using SDL, I had most of what I wanted semi-working when I had all the classes in one include file but I de...
[8 replies] Last: The cpp files should have the #includes The headers shouldn't. (o... (by Disch)
Copy Const vs Assignment Operator
 
1) X x; Y y(x); //explicit conversion 2) X x; Y y=x;//implicit conversion How does 2) does an implicit converstion? What are the steps executed...
[7 replies] Last: Thank you! (by n4nature)
Reading HTML files
 
I dunno why I can't read from the HTML file.
[7 replies] Last: The < and /> markers are what divide the sections. It's easier to just... (by NGen)
Problem: presumably, a segfault (windows won't tell me)
 
So I read this thread ( http://cplusplus.com/forum/beginner/18518/ ), which reminded me of a get_input function I wrote a while ago. It seems I've lost it (my c...
[5 replies] Last: Here's an otherwise sort-of working program (I need to fix another cou... (by chrisname)
Bleh My button is broken
 
Normally I don't post questions but I have spent the last 5 hours looking over this ... So I was making a button for my new program and whenever I hover over...
[no replies]
by cycrow
Socket Libraries
 
Hi, I would like to create a UDP client that connects and sends data to a server I have two questions. Will the standard Winsock library be sufficient?...
[4 replies] Last: I really like Poco Library. Its cross compatible. And its sockets a... (by iharrold)
Still can't understand the LZSS algorithm
 
Hey guys. So I still didn't get round to trying to implement the LZSS algorithm because I didn't understand it. After finding out what the terms used in an expl...
[6 replies] Last: The LZSS algorithm http://www.cplusplus.com/forum/general/17012/ (by closed account z05DSL3A)
email checker
 
If I have 100000 Email ID,I want send email to all but before sending mails I want Check Email ID is correct or not ? I am not talking about Syntax checking ...
[5 replies] Last: hi moorecm i know Regular expressions are very useful but its checkin... (by brainwork)
Finding Primes
 
Hey. I'm a newbie. I've been programming in C++ for about 2 weeks. I was wondering if anyone knows how to write a program to find primes between 1 and 1 million...
[18 replies] Last: @prh, fair enough. If you wanted an awesome boolean variable in C; ... (by chrisname)
by lisky8
Array problem
 
Hello all, i'm constructing a program for a class in university within which i had to store some numbers to an array. Then find the average of the numbers enter...
[18 replies] Last: arhh yes there is another bug in the program if you only enter minus n... (by dobby156)
very quick array question
 
I am sure you get the gist of what I am trying to do; but if not I am trying to have an array of char potentially of different length, these are not user entere...
[13 replies] Last: best! that worked I might post my listing for the method up later s... (by dobby156)
by atja
how to use external library?
 
Hi, I'm quite new to programming in C++/CLI. I think I've got the idea of the basics, now I want to make use of some mathematical functions. I found the "alg...
[5 replies] Last: HI Atja, In order to include your library, (In visual studio 2005 a... (by somshekhar)
Does #pragma once adequately replace #ifndef #define #endif?
 
Are there any issues with this?
[5 replies] Last: A #pragma once type feature is discussed in The Evolution and Design ... (by kbw)
Compiling errors assistance
 
So I'm doing a school assignment that involves testing array classes. When I compiled with g++, I got these errors: test_array.cpp: In member function ‘v...
[2 replies] Last: Thanks. And no I don't. I'm only a beginner. (by Zack11190)
The Binary Search Algorithm
 
Hi, I'm trying to write a program that plays a simple number-guessing with its user. The user thinks of a number and then answers a series of questions asked by...
[10 replies] Last: I think i got it. Thanks for helping guys. =} (by coolProgramer5)
January 2010 Pages: 1... 45678... 17
  Archived months: [dec2009] [feb2010]

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