General C++ Programming - September 2011 (Page 13)

by Srija
How to access the Class Variables in the main function????
 
Hi everybody I am New to c++ programming.. I have written a code like like class fruits { public: int num; public: void color() { cout<<"the color i...
[6 replies] Last: main needs to return an int. (by hanst99)
Covariance in virtual functions
 
Hello everyone! I have written an article regarding the covariance in virtual functions. I think my investigations will be helpful for C++ programmers. You are...
[2 replies] Last: Yeh, exceptions are deprecated feature in new standard. Main idea of t... (by Vladimir Tikhonjuk)
Inventory System For RPG
 
Hello, Can someone please give me a code that acts like an inventory system for a text-based RPG. I need it to store weapons in my game. Any help would be gr...
[4 replies] Last: Thanks, Ceruleus (by Code Assassin)
Get Function not returning correct value
 
I trying trying to find the median but I get the incorrect value. So I assign median=4 and I still get the incorrect value. Can anyone please help me?
[5 replies] Last: In your example: Statistics cat; //Create object cout<<"The Median = ... (by Caligulaminus)
Any better idea to store values in a program as a cache...?
 
In my program i calculate statistical tests between different number of variables (It may be several thousands), I am storing these values in static variable an...
[no replies]
by glamba
Image gallery-OpenCV
 
Hello everyone.. I am writing program for 3d reconstrucion from 2d images.. And I have a problem when i want to show those 2d images in a form of gallery, for...
[2 replies] Last: Yes that is it..Now it works.. thank you Only one problem left, that i... (by glamba)
system.h
 
i am using visual basic 2010 xpress ... for c++ prodramming. i am unable to include <system.h> header waht i can do?? i need to include this file because i ...
[5 replies] Last: thank you bro (by nothing here)
Multiplying negatives using bitwise minipulation (1,2)
 
im making a function that uses bitwise operands to multiply a number by two, i got that for positives you just << by 1 but how would you do it for negatives?
[21 replies] Last: (k=0x80000000) One more thing: by doing y=x&k you can save the sign of... (by helios)
I need help with menu creation and character manipulation within the string
 
Write a function that displays the following menu, reads the selection made and returns the selection as an integer. Write a C++ program that repeatedly asks f...
[1 reply] : I have the impression this is an assignment for class. I would start ... (by Azagaros)
by DSTR3A
Grabbing A Value
 
I have this function and from this function I want to use the value of EOP in another part of the program int main(). How do I get or pass this value, I'm new a...
[1 reply] : int someFunct(int passedvar) { // look into functions in the d... (by Azagaros)
.exe has stopped working.
 
I have an assignment which requires me to delete a dynamic array before the completion of the assignment. But if I do that I get an error message that says prog...
[1 reply] : Are you sure that the array you're deleting is dynamic? (by helios)
Output in csv format
 
I have input my data through command line parameters.I am trying to get my output in .csv format. The output instead of being in the output.csv shows up in the ...
[4 replies] Last: Thanks it worked with ouput just like you suggested (by sdhak002)
C++ complex calculator(HELP!)
 
i used this code for my c++ calculator.. but i need a complex one.. it can only perform 1 operation.. if you input 1+1*8 or (1+1)*8 it only computes 1+1.. i...
[2 replies] Last: thanks..ill try it now..^^ (by mooneyes)
Fibonacci Green Crud Population
 
Okay so I have an exercise I'm doing to better help understand C++ programming. This isn't a project or homework assignment. I'm doing this for practice and to ...
[no replies]
Can somebody tell me why I get this error?
 
Ok, so I am doing a directX tutorial thing and it gave me this code: // directX.cpp : Defines the entry point for the console application. // #include "s...
[1 reply] : Wow, lots of mistakes here. What a low-quality tutorial. 1. The LPC... (by webJose)
by beau
Using my node structure in the STL's priority queue
 
I created a structure called leafNode which contains two data fields at this point (an int and a char), and would like to store it in a priority queue but am ge...
[2 replies] Last: Thank you so much for that Galik, and thank you for answering so quick... (by beau)
by mmolam
erratic execution
 
Using Xcode 3, I created a terminal program that constructs recursively a series of internal data structures derived from a tree of directories, which finally a...
[1 reply] : You couldn't post the code here using the code tags? I have a suspici... (by Azagaros)
C++ pointers to memory - why arent they changing
 
Learning C++. I am on pointers to memory. Have a text file that is read by my program. It decomposes each word to individual characters and places it into memo...
[6 replies] Last: Ok, Helios(sp) has posted something of the basic code example of what ... (by Azagaros)
Server clients and sockets
 
OK so i want to make a program that runs both a server and a client on the same machine My idea is that there will be several of these machines running the sa...
[7 replies] Last: Then I'd say that C++ is the way to go, but I say that about everythin... (by Computergeek01)
Inheritance: Calling Base Constructor
 
Do I define Mode() in the Statistics class and how would that look like? I don't know much about inheritance.
[19 replies] Last: After analyzing this code I have one question, Why do you use two diff... (by Azagaros)
September 2011 Pages: 1... 1112131415... 31
  Archived months: [aug2011] [oct2011]

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