General C++ Programming - November 2008 (Page 2)

How to declare a vector
 
Hi im trying to declare a vector, i.e. in the .h file... vector<TaxPayer> taxpayers; however i want to declare the vetor to b of size 20 and thought you...
[18 replies] Last: Yeah. Because global objects are never appropriate. *cough* std *co... (by helios)
by g0dwyn
Templates: Specializing by Value?
 
Hey everyone, So I know that you can specialize functions and methods by type, i.e. template <typename X> foo(arg1,arg2); template <int> foo(arg3,arg4,a...
[6 replies] Last: @jsmith: Exactly! Thank you for posting that! @seymore: the proble... (by g0dwyn)
by Sumac
Debugging tool
 
I am working on a project where the only debugging tool I have is the use of printf's embedded within my program. To turn this off for release I have written ...
[3 replies] Last: C99 introduced variadic macros: #include <stdio.h> #define fo... (by Duthomhas)
Two ?s, vector<char>::iterator init syntax and base class pointers
 
Hello, I am having a couple of issues at the moment. I declared a vector (vector<char> str) and want an iterator to access it. A book and this site (http:/...
[8 replies] Last: Ok... When I try to compile the code above I get: cloneable.cpp cl... (by enduser000)
error regarding lvalue
 
In the code snippet given below void linklist::cancelticket(int del_class,int del_brth) { linklist* Loc2; linklist* Locp2; findb(del_class,del_brth,&L...
[5 replies] Last: Thankyou.... It works now... Thankyou very much. we had almost g... (by vin1391)
by chiku
Difference in typecasting in C and C++
 
What is the basic difference in typecasting in C and C++?
[1 reply] : C-style casting looks like this: (newtype) value this works perfect... (by Bazzy)
by karang
How to include .lib files
 
Hi I am new to C++ Can anyone please tell me how to refer .lib files in C++ Regards Karan
[1 reply] : Different compilers and IDEs have different methods for telling them h... (by helios)
how to sort a vector of object
 
hi, Ive a vector of TaxPayer objects, instances of TaxPayer have an instance variable of type float call tax, I want to sort such that it lists the taxpayers in...
[11 replies] Last: lol found out meself what was wrong i needed a random access iterator.... (by Pat Nevin)
by Scipio
SDL image
 
Hello everyone, I have asked this before as an anwer in another topic, but I didnt got any answers. I hope I now will :) I'm learning how to use SDL by th...
[13 replies] Last: It's working! Great, thanks all :) The problem was in the space. Ad... (by Scipio)
Linker Error in Service, Dev-C++ [SOLVED]
 
Hello Everyone, I'm writing a simple service to remote manage my other computers. Ive been compiling and testing as I go and alls been fine until I write a par...
[2 replies] Last: I win the darwin award. Thank you so much helios! (by wilcecil)
by rocket
function with const matrix**
 
Hi! I have a class called CEquation for working with polynomials. After a ridiculous amount of math with these, I finally need to arrange them into a matrix,...
[5 replies] Last: Oh, now that I read the Wikipedia article, I understand. Don't use th... (by helios)
[SOLVED] Where can I find this sort of C++ Info
 
Hey guys, Just wondering if any of use know any sites that have information on C++. Not how to actually code in them but the basics and knowledge behind c++....
[6 replies] Last: i think you can read a book written by Stanley B. Lippman called "Insi... (by sunyu)
by jui
Reading file in C++ I/O
 
Hello, I am working on some code that was in "C" but I would like to reuse this using C++. Even the code is running and working but I would like to use C++ ...
[12 replies] Last: Thank you very much Bujiwu and Helios for the help and advice. (by jui)
by karang
Problem with include files
 
Hi I have opened a VC++.net project When I compile the project I am getting an error. fatal error C1083: Cannot open include file: 'Test/Testnamespaces...
[3 replies] Last: you should just use the double quotes: #include "Test/Testnamespaces... (by Bazzy)
Separating function member from the class definition file
 
Hi I have this example working like this: main.cpp #include "ThinkingCap.h" int main(){ ThinkingCap Estudante, Festa; Estudante.Slots("Ola", "Tchau"...
[6 replies] Last: That would be my next question :) I am familiar with the qmake tool u... (by graciano)
clear contents of text file?
 
Hi guys, I have set up a transaction log to log different bank account transactions. as my first menu choice option below is to print the log from the tex...
[4 replies] Last: Hmm, that link doesn't provide an example... All you need is to #in... (by Duthomhas)
by Bollom
problems in functions
 
guys i really have big problem i need some one make this program work correctly because our doctor want it today #include <iostream> #include <cma...
[2 replies] Last: http://www.catb.org/~esr/faqs/smart-questions.html (by Zaita)
OS Development
 
Can anyone point me in the direction of a good tutorial to get me started in developing my own toy OS?
[1 reply] : http://www.superfrink.net/athenaeum/OS-FAQ/os-faq.html (by helios)
problems reading from a file
 
Hi guys I need to create a transaction log which will log all withdrawals and deposits made in a bank account program. I have successfully got it to write...
[12 replies] Last: Oh, clear()! (by helios)
by sunyu
ask
 
i am confused aboult the type_casting in c++,that is: dynamic_cast <new_type> (expression) reinterpret_cast <new_type> (expression) static_cast <new_typ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/typecasting.html (by Bazzy)
November 2008 Pages: 1234... 11
  Archived months: [oct2008] [dec2008]

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