General C++ Programming - March 2012 (Page 14)

by nkan24
problem printing arrays from a function
 
/*************** This function should print the current contents of a single array, with a caption (title) which is supplied as the first argument, and another...
[no replies]
accessing larger than 2mb files.
 
how can i acces files beyond the long size? I need to create my own data base program and need to get beyond the size limit of the long.
[5 replies] Last: You need to use one of the OS functions to do it. For Windows, use Cr... (by Duthomhas)
std::vectors and winsocket
 
Is it safe to call a vector inside a winsocket.. Example: typedef std::vector<unsigned char> bufferprt; // check buffer data size size_t bufSize = bufferp...
[3 replies] Last: Yes of course. The same principles apply :) std::vector<unsigned char>... (by soranz)
Header not recognized in ubuntu gcc compiler
 
I have installed gcc 4.6 on my linux ubuntu system . I want to write all my c++ program to compile on it . The problem I faced was for the 1st demo prog iost...
[6 replies] Last: Thanks guys.. (by shysan21)
Changing From Static Memory Use to Dynamic
 
I've got a piece of code. The first is an item class. Its got 3 data variables, item id, price, and name of the item. Then I have a container class used to hold...
[1 reply] : looks like you want vectors: http://www.cplusplus.com/reference/stl/ve... (by coder777)
Names of Objects question
 
So I have written this program to overload the == operator and compare objects of the MP3 class. I need to generate 1000 objects of this class for comparison pu...
[2 replies] Last: Thank you!! I was thinking about this in completely the wrong directio... (by Bluesbrother)
by poolet
2D array table
 
Hello, I am trying yo build the following 2D array table::: 0 1 2 3 4 5 6 7 0|0 0 0 0 9 0 0 0 1|0 0 0 0 0 0 0 0 2|9 0 9 0 0 0 9 0 3|0 0 0 0 0 0 0 0 4|...
[no replies]
by arashi
Word check and passing ostream objects
 
Hey guys, I am working on a spell check program and I am trying to do things in a manner that is a little more extensive then the standard check word 'a' to...
[1 reply] : here is the whole thing if anyone wants it to compile or w/e includ... (by arashi)
by larjy
Read and input 2D arrays
 
Hi everyone, I'm a C++ beginner currently making a program which uses a 2D array and I need some help :) I know how to work 1D arrays but struggling with this. ...
[3 replies] Last: EDIT: accidentally put braces around each string Okay, glad I could h... (by Taran Gadal)
ncurses multithreading game HELP?!
 
Hi guys. I've been making a console game with the ncurses library. I've set up a couple of windows and pads and they seem to be working all right and everything...
[8 replies] Last: Wow thank you Disch this is a very good documentation you did. And yes... (by doddolfur)
Need help with the error C3867
 
I have created a class for performing sorting using the quick sort runtime function, but complier is giving an error "MyList::CompareNumbers: function call miss...
[4 replies] Last: Either make CompareNumbers a static member function or make it a free ... (by Peter87)
when is the singleton instance deleted ?
 
Hi , I have doubt in singleton design pattern. Basically Singleton is that there will be only one instance of the class being created for the whole applicat...
[3 replies] Last: Why do you need a singleton object for this? C++ has namespaces. // ... (by JLBorges)
Define pointer as Global variable
 
Hi I have to use some functions from some libraries and there functions does not allow to pass my structure to those.So I want to use global variable. Can I d...
[4 replies] Last: Thanks. I tried and it's ok. (by nima0102)
Static members initialization order
 
struct Foo { static int s1; static int s2; }; int Foo::s1 = 6; int Foo::s2 = s1 * 2; Is s1 guaranteed to be initialized first so i can init s...
[11 replies] Last: Thanks. (by morando)
by moot1
what next
 
I want to develop software as a living when i get older. Besides c++ what should i learn to develop software...I would like to sell shareware on like download.c...
[4 replies] Last: App? As in mobile or desktop? Mobile: Learn Objective-C for iPhone d... (by MrHutch)
Operator Overloading
 
Any advice appreciated: Overload the << operator for the Window class-- i.e., write a nonmember ostream-returning function that accepts a reference to an ost...
[4 replies] Last: I would do somethign like this: ostream& operator<< ( ostream& stm, c... (by viliml)
homework problem
 
i need to create c++class to store temperature. class should store temperature(magnitude) and scale (celsius, fahrenheit)class should have constructors as well ...
[1 reply] : Try to use the code tags(lower right of post, "<>") Im pretty use you'... (by Need4Sleep)
Implementation of complx class?
 
Basically I need to implement a class, complx, to manipulate complex numbers: a+bi. Here's what I have for the header file: // Complx.h #include <iostream> ...
[11 replies] Last: Each time you post you list something different. There are three gene... (by Duthomhas)
by cdf
Dynamic allocation of multiple objects within class
 
Can someone give me a most simple example of dynamic allocation of say n objects within a parent class? Lets say there is a constructor of the parent that is p...
[2 replies] Last: new will never return 0. If it can't allocate the memory it throws an... (by LB)
Yahtzee Foundation
 
I have to try and make a foundation for a 5ish part Yahtzee project and it has to roll five dice three times and it allows you to keep or reroll a certain die. ...
[no replies]
March 2012 Pages: 1... 1213141516... 49
  Archived months: [feb2012] [apr2012]

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