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

by doon
delete node
 
if i want to delete a node in a linked list recursively. what shall i send from the main in order test my function what i wrote IntSLLNode deleteNode( i...
[3 replies] Last: so shall the user inter the num of the node that he want to delete? th... (by doon)
Strange quadratic equation c++ bug?
 
Hello, here is my program for solving quadratic equations: #include <cmath> #include <iostream> using namespace std; double quad_equation(double a, d...
[3 replies] Last: ahh ok, thanks alot :) (by Assassinbeast)
Help With Enums
 
I just can't seem to get enums in other classes located in other files. I do not get why this will not work. Main File #include "OtherFile.hpp" void Function(...
[9 replies] Last: As firedraco has already said, it is not a good idea to cast an int to... (by andywestken)
Crash of moving objects
 
Hello everyone, I have some code which creates two rectangles ( same dimension but different color). I want them to move when I push arrow keys (for white on...
[12 replies] Last: A little imagination .... Google C++ compare floating point. Hope th... (by TheIdeasMan)
make a list using 2D Array
 
hi guys........i'm shofi. i am beginner in C++. how can i make list of 'n cities using 2D Array. Sample screen input/output: -How many cities do you want...
[6 replies] Last: i would use a string vector std::vector<std::string> cities; you ca... (by Darkmaster)
Infinitely small numbers
 
This evening I wrote a function to calculate a derivative: typedef double (*func)double; double fprime( func f , double x ) { const double dx = 0.0000000...
[4 replies] Last: Oh, I see. You're right! template<class T> typename std::enable_if<... (by Stewbond)
Please tell me what these errors mean?
 
Please tell me what's wrong with the code. I'm a beginner. https://www.box.com/s/b5va4zu1nnlj15l2mldc It's for my school project. Thanks in advance :) ...
[7 replies] Last: Thank you all :) (by Novice Coder Alpha)
help with coordinate adding program(classes)
 
hello i am pretty new to coding and am having a problem with this code. it's supposed to add two coordinates and is supposed to teach me about overloading opera...
[5 replies] Last: Coordinate Coordinate::operator=(const Coordinate& a)const //<---- y... (by Nexius)
Array programs homework
 
I have an assignment due for this sunday, and I would like to see if some one can guide me to succeed on this. this is the problem. Write a C++ program ...
[2 replies] Last: //This is what I have, but I am not available to range the low, target... (by jricardolopez69)
Help with c++ projecteuler problem
 
Hey I am working on http://projecteuler.net/problem=4 and this is the program I have I don't know why its not working! Please help, looks like it is in an infin...
[8 replies] Last: Thanks for the lesson, I didn't understand very much of that but atlea... (by closed account ETAkoG1T)
Using a Struct in a Priority Queue
 
Hey All, I need some help with the use of a Priority Queue. I have a Struct struct node { string typeItem; int sizes ; int d; int h; ...
[14 replies] Last: > Not sure there was ever an issue with the const part. What would ha... (by JLBorges)
by strava
function template has already been defined & signed/unsigned mismatch
 
I implemented an cpp file however it gives C4018 - signed/unsigned mismatch and C2995 - function template has already been defined error. Is there any solution ...
[1 reply] : The signed/unsigned warning often happens in a 'for' loop when the ind... (by normvcr)
Definitions help.
 
Can someone help me on this problem, because I just don't get what they are trying to tell me without an example (not just words). NOTE: If you have nothing po...
[2 replies] Last: Did you try compiling it? You would get errors. Do you know what a fu... (by firedraco)
typedef as return type
 
Hi all, I was browsing through an SDK (Filemaker plugin SDK) and stumbled upon the following code: #define FMX_PROCPTR(retType, name) typedef retType (*name)...
[3 replies] Last: Thanks a lot. That is exactly the answer I didn't know I was looking f... (by methodos)
Question about const reference
 
Hey.. can anyone explain me why doing: const int& a = 8; is possible? what does it do? how can A refer to something that doesnt exist? and why does it h...
[3 replies] Last: Sweet, it's nice to have confirmation like that! (by Stewbond)
copy constructor
 
Hi all, I have a class A consisting of a member data which is a pointer B* that points to some abstract class B. Now when I try to write the copy constructor...
[3 replies] Last: Yes, I did miss the abstract part. That was pretty interesting to rea... (by Stewbond)
c++ friend operator and Classes
 
I need help with a few things... If someone can PM me, I would sincerely appreciate it. TY
[9 replies] Last: To help you out with other errors that will appear... Once I made th... (by Stewbond)
Prevent program from crashing when entering a char in an int?
 
So I have my code, and you have to write a number. But if you enter a character it just shuts down... How can I make it read characters too withour crashing? No...
[1 reply] : You can try this int i; // you will enter i int f; // flag ... (by TTT)
by djdj
See the source code when compiling in gcc
 
hi sorry my english language is very poor :D . how can see source code when compiling in gcc linux? Is there a options in gcc? The compiler reads the ...
[1 reply] : The source code that is passed to the compiler is saved to an .ii file... (by Athar)
End of File(EOF)
 
Hi, I want to use eof() function to stop reading datas from a file when it reaches to end of data. It works well except one case, which is when the file is empt...
[10 replies] Last: By the way, I said earlier I need to use eof. I used already in while ... (by genclik27)
December 2012 Pages: 1... 3940414243
  Archived months: [nov2012] [jan2013]

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