General C++ Programming - April 2009 (Page 3)

How is cout invalid?
 
Like my name? It suits me pretty well. Especially with this stupid error: #include <iostream> #include <stdio.h> int main() { cout << "Hello\n"; ...
[3 replies] Last: normally using std::cout; will do just fine. (by closed account S6k9GNh0)
by jhr534
virtual functions & paramter list???
 
i have two classes struct A { virtual void f(int) { cout << "Class A" << endl; } }; struct B: A { virtual void f(int,int) { cout << "Class B" << ...
[2 replies] Last: Whether you use classes or structs makes no difference. I tried makin... (by kempofighter)
by Maya
how to compile with visual studio 2008
 
Hello there, I installed visual studio 2008 a few days ago, but still am unable to compile a simple C++ program. Does anyone have an idea of the changes that...
[6 replies] Last: Actually, the statement "using namespace" is for declaring the content... (by GenTiradentes)
Loading random numbers into an array
 
Hi, Everyone! Im trying to load random numbers into array, but not having much luck. Because i am seeding from time() in a While loop, the time has not changed...
[2 replies] Last: GENUIS!!! Makes perfect sense, now! THANK YOU, Helios! Works a tre... (by aburley)
passing a variable number of arguments to another function
 
I want to use a function to log error messages. This function should open a log file and use fprintf to write to it. But I don't know how I should pass the argu...
[4 replies] Last: That was the example code for vfprintf. The real function is more comp... (by matrebatre)
mutex lock issue
 
What would happen if a thread try to delete an object which is locked by another thread (using pthread_mutex_lock) ???
[4 replies] Last: Why do you want to destroy the mutex while the thread is still running... (by matrebatre)
by vRltwE
Select one column or one line from a matrix
 
Hi, I am using matrix vector<vector<double> > matrix_tmp( cols , vector<double>( lines ) ); How I select a specific column or line? There is s...
[1 reply] : Vectors of vectors don't have the concept of rows or columns. If you n... (by helios)
problem creating optimization algorithm
 
The nature of my problem is to design a hypothetical transit system for a city. The input file is very specific, in that it only lists one-way legs that are n...
[3 replies] Last: so helios and others, if i use a* , reading about it i think i underst... (by mariokartlegendd)
Disable Close Button
 
I am making a screensave application that requires a password to exit and resume using the computer but right now you can just close it making it useless... ...
[8 replies] Last: well i'm asking here because i don't know what to do... if i'm underst... (by hypercube1)
by vRltwE
Declaring vectors
 
Hi, I am declaring vectors in this way vector<vector<double> > matrix; matrix.resize(cols); for(int i = 0; i < cols; i++) matrix...
[2 replies] Last: Thanks Bazzy, that was what I want. (by vRltwE)
C++ Timers
 
I have a program that presents the user with a menu and lets the user select various actions. The program deals with passwords and usernames so i'm trying to m...
[7 replies] Last: Alright, so i checked out binaryboy's idea and honestly i dont' have t... (by aeronet)
by dkaip
ascii of wide char
 
Hello. I have a problem. the ascii code in unicode of ἶ is 7990 in Greek language. I am trying to take the 7990 on screen and i can't. Any help? I am runnin...
[2 replies] Last: It dont work. I use codeblocks and gcc compiler. (by dkaip)
Is it possible to hide the mouse?
 
Just wondering if I can change how the mouse looks in console or make it totally invisible. Best I can find with google is how to change it to the waiting hour ...
[13 replies] Last: Thanks heaps for that Duoas - It helps. Only reason I thought of it wa... (by Mythios)
wads wrong with my programe
 
can some 1 help me solve this error and warning.. this is the programe #include <iostream> #include <cstdlib> using namespace std; bool palindromes(lo...
[7 replies] Last: Yes, that is a good example of pass by reference. Using that techniqu... (by jdd)
Troubles with calling object
 
Hi, I have two classes, Ring and Node. Class Ring have an object called ring1 and class Node have an object called no1. At main(), I make an instance o...
[2 replies] Last: Thank`s for you attention!! 's Drika (by drika1109)
Places to begin learning C++ after perl, php ...
 
I have a long background with php and perl. There are a few things that keep stopping me as I try to learn C/C++. 1 - Types : I dont get what types are...
[3 replies] Last: You can try some tutorials: http://www.cplusplus.com/doc/tutorial/ (by Bazzy)
by etoile
read specific chars from a string
 
Hi, I am writing a code for my assignment. One of the function needs to read chars from string between '#' and '/' char e.g: string name = "London, John # ...
[2 replies] Last: using std::string s is better: string name = "London, John # pizza ... (by Bazzy)
Difficult Creating a game...
 
Ive just started C++ programming wandering if anyone could help me, using arrays for a chess game.... please?
[5 replies] Last: it will be better for you to learn c++ and data structures before writ... (by writetonsharma)
Difference between token and literal
 
Hi all, Can any one tell me the difference between token and literals and how they are related to eachother. Thanks Suvojit
[2 replies] Last: hi thanks.... but can u please explain me the literal in a bit simpl... (by suvojit168)
Classes for chess game
 
What classes can I make for a chess game? One class that I made up is const int LEN_FIGURE_TYPE = 10; class FigureType { char m_name ; public: Fi...
[7 replies] Last: I would think the move should simply determine whether the move able t... (by firedraco)
April 2009 Pages: 12345... 20
  Archived months: [mar2009] [may2009]

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