Beginners - August 2009 (Page 6)

by jimmyi
Quesion on explicit copy constructors.
 
i wonder why the following code can not be compiled. // compiler: gcc 3.3.1 #include <iostream> using namespace std; class a { public: a(){} explic...
[1 reply] : Never, ever, make a copy constructor explicit, unless you want to jump... (by jsmith)
List losing elements on sort
 
Hi all, I'm trying to write code (in Visual Studio 6) to generate a number of test customer entries which will allow me to get some timings from another prog...
[4 replies] Last: A lucky Google strike! I wondered if the 37,768 was relevant and ad... (by CrimsonSoul)
by alxsk8
Functions, Errors
 
Ok so I am trying to write (just for practice) a little program that figures out the total net income of an individual after taxes. I am getting funky errors a...
[11 replies] Last: Ooooooooh hahaha thanks a bunch draco, I can't believe I forgot that. ... (by Warrior2089)
cin.get()
 
i made a very simple calculator and when i press enter to receive the result it doesnt work. can someone tell me what i did wrong? #include "stdafx.h" #i...
[5 replies] Last: #include<iostream> using namespace std; int main() { int first_num... (by batsugunx)
cin/cout
 
Is there any way (cout function?) to display the contents of the input queue without discarding them all? Assuming I input "ABC", cin.get() takes "A" and lea...
[3 replies] Last: datatype char stores only 1 character,thats why only A was displayed.c... (by batsugunx)
C++ Online practice exam questions
 
Hi, In Java they have a good online lab practice questions called whizlabs. Is there something similar to this in C++? Even some links with answers and ex...
[no replies]
struct and routines
 
Hi guys, I'm making a game in C++, is it possible to pass a struct variable to a routine by reference? thanks!
[5 replies] Last: Your original premise was also correct. In C++, you can pass by refere... (by Duthomhas)
Joining many text files into one
 
I have 153 text files that I named "1", "2", ..., "153". I wanted to join them into one file named "all.txt". I tried to do this through the code: #include ...
[6 replies] Last: An o stringstream is an output stringstream (which uses the << op... (by Duthomhas)
hdf5-parrallel
 
Dear all, Ok. I am using the hdf5 module to parallelize the IO reading/writing in a c program. I did include <hdf5.h> in main.cc but I got that: "main...
[2 replies] Last: This is how is the Makefile after ./configure CC=h5pcc CXX=pgCC (it se... (by bcollignon)
can't excute on other computer
 
i compiled a program with VS2008, the exe is working like it should on my computer, but i tested it on 3 other computers, and i got this error : http://www.p...
[16 replies] Last: It's misleading in that you didn't give any context with your answer ... (by helios)
Segmentation Fault
 
Hello, I'm new to these forums. I've been working my way through Accelerated C++ and have hit a snag with one of my exercise programs. I'm trying to create a ...
[8 replies] Last: while(d != dc) { if (list == list ) ... (by Zaita)
the system command
 
I am trying to use the system command to launch a python program. example.cc ==================== main() { (...) i=system(program.py); (...) } =...
[12 replies] Last: actually I am working on linux (by bcollignon)
by Cbick
Can't get buffer to clear
 
I cannot get the buffer to clear when I am trying to run my program. #include <iostream> #include <fstream> #include <string> #include <algorithm> usi...
[7 replies] Last: I worked it out chrisname so no need to post a solution that someone c... (by Cbick)
mergng 2 txt file into 1 txt file
 
hey there. i'm trying to read from 2 sorted txt files and then merge them into 1 sorted txt file. but i can't execute them successfully even though the exe. win...
[7 replies] Last: What do you mean sort them? And yes, it's C++ but could easily be t... (by chrisname)
stopping functions with if, else if and else
 
Peace, I read the thread that is about how to ask smart questions, and I think I can ask now, firstly my English is bad so I think I can't explain good way, a...
[19 replies] Last: If you want to return from a void function, simple use return; with no... (by rossipoo)
fstream, possible to write/read at the same time?
 
Hello! I'm pretty much a complete beginner to c++ and was just trying to figure fstream out mostly for fun but i can't seem to find an answer to my question ...
[1 reply] : Hm, if looks like it should be legal...I would think an easier way to ... (by firedraco)
by Timbo1
Firing a bullet with SDL (1,2)
 
I am trying something out with this sdl code but I get this error. In member function `void Bullet::show1()': cannot convert `SDL_Surface*' to `SDL_Rect...
[28 replies] Last: Oh Timbo1 - you really are hard work I'm sorry to say. Do you you und... (by guestgulkan)
Starting out.
 
I just picked up the C++ for dummies book and I would like to know what I should attempt making for a beginner program. Then how I would move on into making 3d ...
[2 replies] Last: also, http://www.cplusplus.com/forum/articles/12974/ (by Gregor)
Bounding Box Collision
 
I am trying to get back into SDL was wondering if someone could help me figure out how to get a bounding box collision set up between two box.jpg surfaces I am ...
[1 reply] : http://lazyfoo.net/SDL_tutorials/lesson17/index.php (by Return 0)
Regarding inheritence
 
Hi guys, one simple question here. When we create a class which derives from another class (let's say A extends B), do we have to specify the inheritanc...
[2 replies] Last: I see, if there is default constructor. Thank you for the answer. ... (by cppuser)
August 2009 Pages: 1... 45678... 17
  Archived months: [jul2009] [sep2009]

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