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

Wrong Answer ???
 
Here's the question :- Indraneel has to sort the books in his library. His library has one long shelf. His books are numbered 1 through N and he wants to rearr...
[3 replies] Last: these problems come from Indian I thought something like this. The no... (by coder777)
A little help with member data
 
//Given the class declaration// class Point { public: Point (int=0, int=0); // initializes xCoord and yCoord void setPoint (int, int); // a...
[1 reply] : Where's the question? Are you looking for confirmation on whether is ... (by webJose)
by Exiled
Crash on string::insert?
 
Alright. I'm currently making a login screen for my game. I'm using the library of Allegro 4.2.3. I'm making some textboxes(for the username + password), and...
[5 replies] Last: I use the one that is defined like the following: string::iterator ... (by Exiled)
Babylonian method for square root.
 
I'm trying to build a square root function to do square roots using the babylonian method, but getting the wrong result. I have the following code ...
[1 reply] : The Babalonian method of calculating the square root of 2 simply progr... (by buffbill)
What concepts do I need to understand 100% before starting C++ Data Structures?
 
I'm planning to take a C++ Data Structures class in the fall, however I don't feel ready for it all. I'm currently in my 3rd semester of C++ programming, which ...
[1 reply] : Recursion is frequently used in lots of data structures, so that's a t... (by ascii)
Assertion error on deleting object
 
Hello, i have a class called stInput that looks like this: class stInput { public: LPDIRECTINPUT8 din; LPDIRECTINPUTDEVICE8 dinkeyboard; BYTE keyst...
[1 reply] : Ok i discovered that if i handle the object like this stInput* pIn... (by hazarada)
by Baelix
SegFault in a While Loop Condition
 
Hey guys, I'm apologizing in advance for the length of this. I'm incorporating a Linked List class via a Node structure (i.e. pointers). This is usually a bree...
[5 replies] Last: What does your final code look like? (by lemonaid)
anyone can help me for "Try and Catch" method?
 
#include <string> using namespace std; #ifndef _FRUIT_H #define _FRUIT_H class Fruit { public: Fruit(string name, string color, int weight); ...
[2 replies] Last: int main(void) { Banana banana; Mango mango; try{ ... (by kazesensei)
by cdf
copy and assignment operators
 
I need someone to explain what how to write a copy constructor. obj(const obj &);//copy constructor I'm not giving you the class code, no need for you to w...
[5 replies] Last: Okay, fair point. But the example you posted above seems somewhat unr... (by ascii)
successive approximation
 
Hi, I am working on a program that will allows the user to compute the Nth root of a value, X. I am having a bit to trouble getting the getNthRoot method belo...
[1 reply] : in getNthRoot power(f, posInt); f and posInt are not declared in thi... (by k0t4)
Status Programming
 
Hey guys, For work I have been asked to write a program where: View stats (ie, cpu usage, available space etc.) of our network servers. will this method wo...
[2 replies] Last: It's connected via Fibre.... (by Jordan Bryant)
Read in only text from file not numbers
 
Here's the code. I'm reading in a menu from a .txt file. The "getdat" function is supposed to read in just text not numbers. any ideas? Show menu isn't needed i...
[no replies]
Help with figuring out program
 
I don't work with classes to much and was trying to figure this out any help would be great. Thanks ////MARKED LIKE THIS PARTS ARE WHAT I GUESSED//// .....
[no replies]
Encryption troubles
 
Here is the crypt.cpp file and the assignment says I need to write an encryption function, crypt with ths algorithm: The cryptographic key K is a 16-bit int...
[no replies]
Operator Overloading
 
My teacher gave me a quiz that was an old test she has used in the past. Now I've done the previous homework and have some understanding of operator overloading...
[no replies]
Need help with a value-returning function
 
Hello everyone, Been working on this program and have it all put together except of one problem. I need to return a total of the overall amount of lumber orde...
[2 replies] Last: Thank you so much vin It works now with your help. I also have chan... (by ettedo2000)
c++ For Game Development
 
Ive been learning c++ for a while now and when im older i might want to go in to game development or making them from scratch is c++ a good way to go about this...
[4 replies] Last: I'd start by making a couple of console games. Console being the Win... (by hanst99)
by J03
Avoiding use of global variables
 
Hello Everyone, I made a function which finds local minima for an arbitrary function passed to it: void Minimization(double *parameters, int Nparameters,...
[9 replies] Last: Cheating: make the double* to be passed to function_to_minmze be a cas... (by LB)
how to break the 1d character array into small arrays
 
I have a file in which i have data stored in the form of file1.txt file2.txt file3.txt file4.txt file5.txt I have put this information into a 1d arra...
[3 replies] Last: i have done it with a 2D array .. thank u so much both of u ... (by hassannoor11)
Running c++ application in webbrowser?
 
is it possible? I would like to create some simple web-browser game but I don't feel like I can start to learn another programming language cuz I'm still improv...
[7 replies] Last: You can create a CGI script that will run in a web browser. You would ... (by WilliamW1979)
March 2012 Pages: 1... 56789... 49
  Archived months: [feb2012] [apr2012]

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