Beginners - January 2011 (Page 3)

by Varine
In-Memory Database using Array of Structs
 
I wrote most of a simple bank software program for an intro class in C++ using Visual C++ 2010, however apparently it needs to be an in-memory database (didn't ...
[2 replies] Last: The documents say "The database is a simple in-memory database impleme... (by Varine)
by vladi
revers and array with only pointers :D
 
So i have this array int a = {45,67,89,4,3,101}; and need to just revers it to int a = {101, 3, 4, 89, 67, 45}; using no and only pointers. Th...
[4 replies] Last: oh ok perfect works now:D Thanks! (by vladi)
by acorn
explicit
 
I am trying to understand the explicit keyword. if my understanding is correct the explicit keyword prevents this from happening. class circle { public:...
[2 replies] Last: ok thanks Zhuge (by acorn)
About with func.
 
Hi, I want to a hex variable with c++. My codes: #include <iostream> #include <cstring> #include <stdlib.h> using namespace std; public class heks...
[2 replies] Last: Thanks Moschops. (by Helegurbann)
by ctrlz
printing asterisks
 
i have to write a code that makes the asterisks print like this: * ** *** and so on. this is what i had before, but this code is wrong since my professo...
[1 reply] : Its really simple the program you want. You only need two for loops... (by wolfgang)
Banking Software
 
Hi, I am having some trouble with a project I'm doing for school. I am trying to write some bank software. The part I am having trouble with is entering a new ...
[9 replies] Last: Okay, that makes sense. Thanks again hamsterman! (by Jeff123)
by Zeikko
switch default without "goto"
 
How should I use default case on switch without goto? I mean, if user's input is invalid, and I want user to type input again, how should I do that? Previously ...
[2 replies] Last: do { get_user_input(); }while( user_input_is_not_valid ); ... (by Disch)
by Ali89
Question
 
Hi everyone, Why we should sometimes write "const" before some parameters in the function declaration or prototype? Should we put a "const" before any inp...
[7 replies] Last: Thanks in advance Sajith :-) (by Ali89)
by jayman
Phone Program
 
I have a program i am trying to build and i kinda lost on what to do. Any help or advice will be great. Here is the pseudo code i am using. Using the pseudo ...
[2 replies] Last: http://www.pastie.org/1511976 (by jayman)
Getter problem
 
#ifndef DBMANAGER_H #define DBMANAGER_H #include "dbconnection.h" #include "TSingleton.h" class DBManager { SINGLETON( DBManager ) public: const Abst...
[no replies]
Does this look like shell sort to you?
 
/* shellsort: sort v ...v[n-1] into increasing order */ void shellsort(int v , int n) { int gap, i, j, temp; for (gap = n/2; gap > 0; gap /= 2) for (i = g...
[6 replies] Last: http://en.wikipedia.org/wiki/Sorting_algorithm This is a C++ forum,... (by hanst99)
Reading in and formatting text files
 
I have to write a program that reads in a text file that has messy formatting and reformat it to look nice per my teacher's instructions. Some lines in the text...
[2 replies] Last: Ok. I get what you're saying. I have an example of what my output shou... (by superhead91)
virtual tables
 
Can i access the virtual tables explicitly ??? According to my understanding the virtual table is a an array of pointer to functions. So can i like get the base...
[1 reply] : EDIT: double post http://cplusplus.com/forum/general/35552/ (by Disch)
random_shuffle isn't working
 
I using random_shuffle from the #include <algorithm> library to randomize the elements of a 46 element vector. Buts its always the same. Do I need to seed som...
[2 replies] Last: Works perfect thanks! (by shadowvillian)
unpointing to "new" allocated memory
 
Hi, quick question. What happens to memory that is allocated in a fashion such as this- Item* temp = new Item ///Item is a struct when its pointer is rea...
[3 replies] Last: [quote=flclempire]Heck, could I simply do this? ;) Yes. calling new in... (by coder777)
Question About Double Data Type Arithmetics
 
Hey all, Quick question if I may. I'm building a game, which is helping me extensively in my learning C++, and I came across some arithmetics regarding a ...
[3 replies] Last: Well, this is embarrassing lol. I knew that it was scientific notation... (by wolfcry)
How to read text from file and accept user input as well.
 
My professor assigned us the following: Read a file of integers named "integers.txt". The file will consist of one number per line. For each number that you ...
[1 reply] : The assignment doesn't say anything about user input? Anyway if you w... (by hamsterman)
runtime error,debugger stops at "int y" line 147, i need a hint
 
nvm i got it The program runs ok if i put valid inputs, but when i input 123 for binary this will happen: Input binary #: 123 This application ha...
[no replies]
Making a friend of a template class function
 
How do I make a friend out of this template function? template <class T> class Handle { public: Handle(): p(0) { } Handle(const Handle& s): p(0) { i...
[6 replies] Last: The developer office 2010 efforts behind LibreOffice Office 2007 now c... (by tea44149)
Getting pixel color
 
I would like to get the RGB values of a pixel at different x, y coordinates on the screen. How would I go about this in C++? The end goal is to create my own...
[1 reply] : How about openCV2.2? http://opencv.willowgarage.com/wiki/ Mat_<cv... (by stereoMatching)
January 2011 Pages: 12345... 42
  Archived months: [dec2010] [feb2011]

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