General C++ Programming - March 2009 (Page 16)

by ryanli
A little confusion between `char' and `unsigned char'
 
I'm currently working on something that need bit operations and I decided to use unsigned char to manipulate. However, I've got some strange results. Let's hav...
[4 replies] Last: Thanks a lot! (by ryanli)
by tition
Is there a way to turn off default copy constructors?
 
Hi all, The default copy constructor just caused me a lot of grief. I had written a template class which used the operator "=" for assignment (I was using both...
[11 replies] Last: Found the option! Now it warns me! One must set "warning level" to "le... (by tition)
Outputting nothing
 
Is it possible to output a variable with no value? Also, is there a code to know if a variable has a value? I need this concepts. Help. Urgent.
[5 replies] Last: Perhaps a compile-time warning at best, but definitely not an error. ... (by jsmith)
Binary search tree homework question!
 
Step 1: We are given this to put into a header file called int.h: class integer { public: // constructor, initialize intValue and set count = 1 integer(...
[2 replies] Last: So… What's the point? (by ryanli)
by lidong
do you have an example of object-oriented game?
 
we have an assignment in our programming about object-oriented programming but i dont have any idea what program. need help masters!!!...
[2 replies] Last: You can't develop a modern game (efficiently) without it being object ... (by Return 0)
Rebuilding...
 
I made a program on another computer but I don't have the computer or the main files for the project and I wanted to get them back because it doesn't work any ...
[2 replies] Last: Never mind! I figured it out. (by ownedpk)
linked list implementation
 
can someone help me check whether my linked list implementation is correct, as in without any logic errors? Do comment on any possible improvements that could b...
[6 replies] Last: gee must be hard work typing all that out but thanks for the tips, I a... (by unregistered)
by tition
Hashing arrays
 
Hi all, I am writing at the moment template classes for polynomials. (Rewriting actually). I ran into some computational problems with the code I have below....
[10 replies] Last: Now that my program is back to running, here is a typical example of t... (by tition)
Just Too Long...
 
I'm pretty sure my matrix vector multiply method is having problems with the vector size I need it to handle. I tried switching to "new" in order to put the y v...
[3 replies] Last: What is this->m set to? The vector is not going to grow when you use ... (by kempofighter)
string class constructor
 
I have to construct a class for strings. C++ already has one, but my assignment is a home-made version. I am very lost as to how to make the constructor work....
[4 replies] Last: You need a couple of constructors. The default one, as above, shoul... (by jsmith)
by sable0
Code
 
sddfsdfdfdsfadfa
[1 reply] : int mat = { {25, 23, 26}, // declares a 2D array and fills it {1... (by Disch)
by arce
plug-in's in Ubuntu 8.10
 
Hi, I am trying to use a software (CERN's SEAL) based on plug-in's on an Ubuntu 8.10, but this distribution dose not have HAVE_DLOPEN defined and the plug-in...
[no replies]
Issues with my do while. And trouble with adding my stored array info.
 
I am having trouble with getting my do while loop to function correctly and I can't figure out how to get a totals for my sales price, sales tax and cash price ...
[2 replies] Last: My do whille loop still causes my program to crash. and i cant figure ... (by scuba steve)
vector member variable
 
I have a class which needs a large 2D matrix, preferably of dynamic size but compile time setting of the size is ok if necessary. I would like to use the vector...
[1 reply] : I take it this line is in the constructor for the class? Do you hav... (by jsmith)
Stroing pointer value in a string
 
The program crashes intermittently, when I store pointer value in the string, and convert back to pointer and deference the pointer. Can anyone help me understa...
[6 replies] Last: The first hint that your program has a bug should be the need for rein... (by jsmith)
how to make const a non const string
 
Hello, I have a listing where I declare a string path like this: std::string basePath; I would like to make this string also available to my other list...
[6 replies] Last: Hello again, Onur I will use your 'simpler' solution because it i... (by trfillos)
by pliu00
able to compile&run in VC++ but unable in dev-c++
 
i d/l a source code called wcomm.cpp & a main.cpp for main.cpp:error: In function `Z9runserverv': [Linker error] undefined reference to `WComm::startSer...
[no replies]
Pointers As Map Key In Static Map Member
 
I'm having a hideous problem with a program I'm working on involving a map with pointer keys. The keys are pointers (to objects on the stack) and the data are p...
[3 replies] Last: Keep in mind that construction order of global/static variables is gua... (by jsmith)
by Disch
Typedefing a partial template
 
In a similar vein as my previous question (all these little details of templates are a lot to wrap my head around -- this is the first time I've made a point to...
[4 replies] Last: They wouldn't work for me. The way I undestand them they're for using... (by Disch)
by Disch
partial template specialization
 
I have a template class which takes two template parameters. I want to make a template specification for only one of the types, but it appears as though I ca...
[4 replies] Last: yeah -- still get the error C2687: cannot define a nested UDT of a te... (by Disch)
March 2009 Pages: 1... 1415161718... 21
  Archived months: [feb2009] [apr2009]

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