General C++ Programming - October 2012 (Page 17)

Doesn't write out decimals...
 
#include <iostream> #include <string> using namespace std; int main() { int h; int min; int sek; cout << "Ange antalet timmar: "; cin >> h; cout << ...
[2 replies] Last: @helios min and sek are integers, so min/60 and sek/3600 are integer d... (by AnEvilVegetable)
Reference to member-function of inherited class
 
Hi, I have some problems with calling by reference function in inherited class. here it is: // Base class class Base { public: dMatrix Base::*nrfunc ...
[4 replies] Last: Isn't that book written in C? Yes, in just C, without pluses. dM... (by Stas Kubrak)
Getting location of file into string
 
I'm organizing a database of customers information into a folder. The folder is called Customers. In this folder are 26 other folders with each letter of the al...
[1 reply] : My problem: I need to get the full path of each text file into a stri... (by coder777)
Address of data stuff
 
The below should hopefully be enough for you to get what I'm trying to do in this instance, and also what I need help with (can't seem to get the right search t...
[14 replies] Last: If it crashes then it provides me with a scenario to learn from, anywa... (by awsdert)
Virtual file systems
 
I have been developing a game for quite some time now, and it depends on various folders with images and .dlls to run. Is there a program that can package the ...
[2 replies] Last: If you want a nice exercise that will keep you busy for a couple weeks... (by helios)
recursive function on a map of objects segfaults when i pass by value OR reference
 
Hopefully someone can shed some light on this one for me, since this is well beyond my limited programming experience. I am working on a program that reads a tr...
[no replies]
by topsaa
reading txt file into vector of struct
 
resolved
[5 replies] Last: [quote=vince1027]Hint: It is possible to obtain the address of the fir... (by ne555)
so im trying to install sfml onto code blocks i get two errors
 
the first one i managed to put a system.dll file into the correct debug folder and when i tried to compile code i get the error could not find -sfml-system s...
[11 replies] Last: Have you tried SFML Coder's tutorial? http://sfmlcoder.wordpress.com/2... (by naraku9333)
Allegro checking if key held down using bool as a flag
 
I'm trying to make sure that input is taken based on separate keystrokes, not on every time the keyboard buffer is polled. This is what I have so far (only the ...
[8 replies] Last: I got it using the if statements, but I had to include another if stat... (by Hurricane)
C++ error duno how to solve:(
 
#include<iostream> #include<string> using namespace std; class advisor { private: int id; char name ; char ra...
[4 replies] Last: Here are the errors I see: Line 66: getId is declared as returning f... (by AbstractionAnon)
Password Program
 
Hey guys I've been working on C++ for just a couple months now and i want to create a program that asks the user for a password, i will set that password as 123...
[10 replies] Last: By doing it AbstractionAnons way, your loop terminates. Doing it any o... (by pogrady)
by mih
In function `__static_initialization_and_destruction_0': multiple definition of `Column::Names' first defined here
 
Hello all, I am getting the below error while trying to compile C++ files. CC -O -pthread -w -g -I. -I/<<dirpath>>/src/global/include -I/<<dirpath>>/src/g...
[6 replies] Last: The DataGrid.cc file do not have main() method nither do any of the ... (by mih)
c++ vector objects erase function
 
hey, Im a CS student new to C++ as i used to use java, and well decided to google around to find something to remove an object from my vector (aka arraylist in...
[3 replies] Last: wow that was soooo noob on my part... lmao thanks a ton ne555 , that... (by blade86sam)
by dovip
help me
 
I think I may mistake myself. For my homework. Here #include <iostream> #include <cmath> using namespace std; int main() { int n; int i; ...
[3 replies] Last: Oh never mine. I found it. http://v2.cplusplus.com/forum/beginner/6185... (by dovip)
Binary Search Tree Manipulation (Fresh Look Please)
 
After doing a lot of looking I think there is something wrong with my removemin function. Could someone look it over and see if anything is wrong. mybst.h ...
[no replies]
Pointer always returning NULL
 
Hello, Whenever the below code goes through the pointer transition always returns NULL despite being edited in the function. This happens 60 times a secon...
[5 replies] Last: Huh, I honestly didn't know it worked that way. Thanks for your help e... (by Tyler Hummel)
by mih
C++ compilation errors: redefined , NULL used in arithemetic, undefined reference to,
 
hello , Bit of background before I mention errors :I am in process of migrating C/C++ project from Solaris 32bit to Red Hat Linux 64 bit.The old build process w...
[2 replies] Last: Was able to fix warning #3 )/src/grid/obj/Datagrid.o: In function `D... (by mih)
by AnaDC
Streaming Hex Values
 
I have a data file with hex values representing a byte of data per two hex characters. I have to stream in this data, and I'm currently streaming this data from...
[5 replies] Last: Thank you very much. That answers my question. (by AnaDC)
Choosing the Correct Container
 
I have a data structure that contains several different types of data like so: struct Tool { const int toolID; const QString toolName; ...
[3 replies] Last: Yeah, You could have the various ways of extracting a bunch of tools r... (by mik2718)
by Vy C
Can I Rand my Switch????
 
Can I randomize my switch: Any help would be great. switch(number) { case 1: cout << "Roc...
[2 replies] Last: Thanks maeriden, that worked!!! (by Vy C)
October 2012 Pages: 1... 1516171819... 50
  Archived months: [sep2012] [nov2012]

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