General C++ Programming - December 2012 (Page 21)

array and linked list for large problems
 
Hello everybody I have a question, can anyone help me? I write a program to solve "Shortest Path Problem" and use an array of linked list to store the parame...
[1 reply] : Please do not double-post: http://www.cplusplus.com/forum/general/8800... (by LB)
meaning of error message
 
Could you Please help me? what's the meaning of this error message? "Windows has triggered a breakpoint in Network1.exe. This may be due to a corruption of the...
[1 reply] : [quote=shkmokarami]what's the meaning of this error message? Windows s... (by LB)
Floating point exception run time error for a write program,How to correct it???
 
This is one of the prob. listed in OPC,can anyone pls pinpoint my error and rectify it, I'd be thankful to u. Problem 1: 0/1 Tiles, (K Narayan Kumar, CMI) ...
[1 reply] : Floating point exception often means that you are dividing by zero. (by Peter87)
by zubaja
Is it possible to simplify overridden operators?
 
Hello everyone, New poster here and semi-experienced with c++. I have a quick question; Is it possible to simplify overridden operators for custom classes? ...
[3 replies] Last: *player.transform.velocity += player.transform.velocity; Works like ... (by zubaja)
Polymorphism or Switch
 
I am just wondering which is better class bird { public: float fly_speed(){ switch( _type ){ case COLIBRI: return age() * 0.3; break; case...
[4 replies] Last: Ok... Thanx for your answers I think I will go with polymorphism for ... (by rmxhaha)
by musico
Inheritance problems
 
I am trying to figure out inheritance using separate files for headers. This is a program from an old book that was written all in one file, I am trying to rew...
[9 replies] Last: class MyClass { int v; public: MyClass(int x) : v(x) {} //thi... (by LB)
help with code
 
#include <string> #include <iostream> #include <iomanip> #include <cmath> #include <cctype> using namespace std; enum Species { LoblollyPine, Wh...
[6 replies] Last: ...Seeing the Report button pressed... I don't think I have offended... (by S G H)
seekg and file of 4294967295 bytes
 
I'm using VS2010, and I found very weird thing. If you're working with the file of exact size of 4294967295 bytes, seekg fails! #include <iostream> #i...
[4 replies] Last: The answer on stackoverflow is incorrect The problem lies exactly in ... (by user1897425)
01Tiles - i am getting "Time exceeded"
 
Hi All, I am new to this site and also new to c++ programing . Currently in learning stage. Recently i have appeared in Zonal informatics olympiad and have c...
[3 replies] Last: You need to change the algorithm, so go back to the drawing board. A... (by ne555)
by Tyson
begin to control machines using programs
 
i would like to be able to control different motors and machines using my pc. i want to learn how to program for machines. i would like to write a program that...
[no replies]
distance from point to line
 
I'm having problems with the calculation of the distance from a point to a line in a two dimensional space. It's something wrong with the math in this code, but...
[5 replies] Last: think that was the dot product and the minus is neccessary to create t... (by Darkmaster)
Permutation problem - "Time exceeded error " in coding
 
Hi All, Here is another problem which i have tried to decoded and land up with the same problem of "Time exceeded" . as i am a beginer , i am not able to de...
[no replies]
Random char array generator
 
I was wondering if some one could help me out and let me know what I am doing wrong. I am new c++ so it would be a great help, not looking for the full code jus...
[1 reply] : Add srand (time(NULL)); as first line inside main() oe else you will a... (by modoran)
by zAMLz
Hey ASCII RPG Game
 
So hey everyone...I am making an ASCII based PRG and thought i should show it to the C++ Community. I only have one problem. I don not have a story based on my ...
[2 replies] Last: it is available...its in the youtube description... ill post it here a... (by zAMLz)
by game
Making array with Uknown size and order it
 
Dear Users and developers I want to make an array from Unknown size and order ascending order. As shown in the following peace of code, the number n is...
[16 replies] Last: Dear Guys , Thank you very much for your correction and comments! ... (by game)
Portability of truncation of cast: (int)myFloat
 
I have some functions that depend on the truncation as opposed to rounding when casting a float to an int. is this portable behavior, or bad practice? Does a...
[1 reply] : It's in the standard. An rvalue of a floating point type can be con... (by Branflakes91093)
by amzar
linked list
 
hello, i'm new to c++. is there any possible to add searching function for linked list coding below? please show me how to implement it. #include<ios...
[no replies]
its opening in notepad
 
i am making my program using dev c++ but when i open it, it opens in the notepad not in the dev c++ unless i'll open first the devc++ icon and find for my saved...
[1 reply] : Can't you just right click the file - Open with - Choose default progr... (by Hippogriff)
by Ali93
How to print slowly
 
Hi Guys A few days ago i saw a program that printing(cout) words slowly In normal cout - it will print the word immediately I want to know how to print t...
[12 replies] Last: I have an assignment and i add this to make it more attractive at the... (by cnoeval)
aritmetic operation about
 
The code: #include <iostream> using namespace std; int main() { double a, b, c, d; a = 1.38371e-20; b = 4.12551e-19; c = 1; d = c - (...
[1 reply] : You can increase the precision in your cout.precision() function. Howe... (by Stewbond)
December 2012 Pages: 1... 1920212223... 43
  Archived months: [nov2012] [jan2013]

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