General C++ Programming - July 2009 (Page 12)

Arrays as arguments in a function
 
I want to pass an array as an argument in the following function. void sortlist (int& t, nodes *kk=new nodes){ nodes temp; // holding variable...
[3 replies] Last: I agree with kfmfe04. The name of the array is a constant pointer to t... (by pdmishra)
by artium
streams questions..
 
I want the cin stream in my program to take input from another stream (I want to preload it with a content of a file) rather than from the keyboard input. I kno...
[4 replies] Last: Thank you. This is exactly what I was looking for. (by artium)
anyone else feel this way (1,2)
 
OK first up, I am old knarly programmer who started with FORTRAN / COBOL then going to C and eventually C++. In particular I became pretty damned hot in C and a...
[23 replies] Last: IMHO, C++ is a complex language, in the sense that it is "full of surp... (by kfmfe04)
An auto_ptr question
 
Hi All, It seems to me that auto_ptr can wrap up single pointer. How can I use it to wrap up an array of pointers? Please see the following example for my i...
[5 replies] Last: Yes. Boost's smart pointer "scoped_array class template" is the soluti... (by Robertlzw)
by Faken
Will muti threading provide any proformance boosts?
 
Hello everyone, I am new to programming in general so please keep that in mind when you answer my question. I have a program that takes a large 3D array ...
[9 replies] Last: Thank you very much Helios! Now all that's left is for me to do som... (by Faken)
sizeof
 
void* buffer = operator new(100); How do I verify the size of buffer after executing the above statement?
[5 replies] Last: @jsmith: I reviewed some of the uses of word "new" as follows: - ne... (by n4nature)
compilation error
 
#include <iostream> using namespace std; class SpaceShip; class SpaceStation; class GameObject { public: virtual void collide(GameObject& otherOb...
[2 replies] Last: Solved it. Thanks. (by n4nature)
how to populate a static member map?
 
Suppose I have in MyClass.hpp #include <string> #include <map> using namespace std; class MyClass { private: map<string,int> g_mymap; }; and in ...
[3 replies] Last: Oh, yes, returning by const reference would be preferable. (by jsmith)
Contructor for a nested Class
 
class flow_rule_swift { private: double a,b,n; public: flow_rule_swift(double x, double y, double z) { a = x; b = y; n = z; }...
[4 replies] Last: Hey Disch.. Thanks a lot for the awesome reply. Have a nice evening,... (by luckycusp)
puts impementation?
 
Is it possible to implement something like puts/printf/cout/etc using only the keywords that C/C++ offer? ie, can you print something to the console without dep...
[4 replies] Last: Are you deploying on a small system where you won't have a standard l... (by Poke386)
by Gregor
array class, please comment
 
ment to be simple, you can use it as an normal array or as an simple vector (which I tend to use alot) //Simple array, if AllocSizeInBytes is less than size...
[3 replies] Last: fail'd :D Thanks Disch: yhe, I tought I knew how to write a si... (by Gregor)
removing duplicates
 
My name is James. I am still a beginner programmer but am taking intermediate programming classes. Right now the class I am taking is Intermediate C++ and I am ...
[3 replies] Last: Thanks to all. This helped tremendously. I greatly appreciate it. (by dragonwolf)
# Define, identify with # defines, if a parameter is default
 
#include <stdio.h> #include <string.h> #define _minhaFuncao( a, b) MinhaFuncao(__FILE__, __LINE__, a, b); void MinhaFuncao(char* sArqCPP, unsigned long ...
[4 replies] Last: Cool... Thanks! (by opessoa)
by jolly
adding add-in menu in the menu bar
 
Hi to All, I'm new in c++ programming. Anyone can help me how to create a add-in menu in the menu bar of Microsoft Visual C++ 6.0? Thanks in advance.
[no replies]
defining "scores" in declaration
 
well hey there guys i have tried several things to try to define this declaration and i dont know where i am going wrong does anyone have any ideas what need to...
[2 replies] Last: I'm not sure what your mean, but i guess that even you define the "sco... (by player6)
std::vector
 
I have to pass two dimentional vector to a function. But i am not able to do this.
[4 replies] Last: Thank You :) (by sreelini)
by Disch
Typed enums
 
Typed enums were always a subject of confusion for me, since conversions to other integral types are implicit in some situations, and aren't implicit in others....
[2 replies] Last: Yeah that does help. Thanks. I'm wanting to do something similar. ... (by Disch)
by vijkrr
How to find new line char in a string
 
hi All, Through Web service i'm downloading a file as a string. Now the string is having the whole file. I want to extract line by line in that string. Ca...
[14 replies] Last: Damn. VC++ doesn't do it. (by helios)
by petry
std::string::find vs std::find
 
Hi All: I have a large number of elements to be stored into vector or basic string(delimited by \n). I need to search for an element and I would like to know...
[2 replies] Last: In general, the class-specific find functions should be no worse than ... (by jsmith)
by Deimos
Are these classes well implemented?
 
Hey again, After trying to produce an actual game using my first game engine, I reached the conclusion that it sucked. It's mostly because I didn't pay much ...
[2 replies] Last: Any reason you aren't just using a Boost shared pointer for your ref c... (by PanGalactic)
July 2009 Pages: 1... 1011121314
  Archived months: [jun2009] [aug2009]

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