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

How do I dynamically allocate memory to a double pointer in an object
 
I am trying to create an object which allocates memory to a lower triangular matrix of doubles. The memory needs to be allocated dynamically. The following code...
[2 replies] Last: Works! Thanks a lot. (by duggarm)
Processing Power and Electricity
 
He everyone, Maybe I didn't come to the right place to ask this question, but I was wondering if anybody knew. If electricity travels so fast and at a consta...
[12 replies] Last: * Correct me if I'm wrong. I believe you're right. When we finall... (by cnoeval)
by Kyon
Collatz Conjecture
 
After fiddling around with the Collatz Conjecture model I made in Mathematica, I realized that it can be used to map natural numbers to special coordinates - Co...
[5 replies] Last: I believe a char by itself is either signed or unsigned, depending on ... (by firedraco)
C++ vs C
 
Ok so I'm sure this question has been asked a million times, but what is the practical differences between C++ and C? When would you use one over the other? I u...
[11 replies] Last: C++ is a superset of an older C standard. Meaning that C++ surely adds... (by Kyon)
by zmmaj
CALLBACK inside DLL problrm
 
Hi I make a wraper dll ... So, I need to export to aplication some result... Well. this is code: xVideo.h #ifndef xVideoDEF #define xVideoDEF(f) WINAPI...
[no replies]
Dynamic Array Not Properly Allocating Memory
 
This code is supposed to iterate through a dynamically allocated array of 5 elements in size and store the user's input into the array in the next slot. But whe...
[8 replies] Last: It's difficult to provide further feedback without seeing more of your... (by closed account DSLq5Di1)
Programming for mac and pc
 
Hello! Im going to programme a simple game with an IDE for both pc and for mac and linux. And I need some basic information about how that can be done. Do I us...
[3 replies] Last: I have some sort of photografic memory so ill learn quick so i usually... (by Chantek)
Was the function really inlined?
 
Hi! I have a question about inlining ... How can i check was function really inlined by the compiler, or it fully ignored my request for some reasons (or pa...
[17 replies] Last: Just FYI, if you haven't done profiling, you shouldn't be concerned wi... (by moorecm)
by agarg
Binary Search Tree -Insertion
 
The problem is in this program , lnext and rnext(subtrees) are not getting correct values.They continue to be NULL even after insertion! //BST #include<iost...
[2 replies] Last: Thanx mcrist,but the program is still not giving my desired output,ie ... (by agarg)
by MR YAJ
How to find the position in array. please help ASAP. (1,2)
 
Here's my problem sirs. I need a code for this output please help me. Also include some brief explanations thank you very much! SAMPLE OUTPUT: Enter a nu...
[21 replies] Last: Thanks for the help! ;) (by MR YAJ)
need help with while loop!
 
#include <iostream> using namespace std; int main() { int n1, n2; int i=n1; cout << "Enter 2 numbers "<< endl; cin >> n1, n2; while (i<=n2){ cout...
[4 replies] Last: @mcrist: I had intended it to be for the OP so that he may try to find... (by Nisheeth)
Abstract base class question
 
Totally dumb question, I know, but.... What determines whether or not a method must be overridden when deriving from an abstract base class? class ABC { vir...
[2 replies] Last: Thank you! This is exactly what I needed. I am trying to learn the ins... (by jwjohnwright)
by kal27
[BIG HELP:] File Reading and Writing in C
 
hello guys!!! pls help me with my probem.. i just want to make a simple database like,, the program will ask the user if he wants to edit the existing inf...
[3 replies] Last: umm, look into scanf, fscanf, fprintf, sprintf. Most of them work ju... (by Azagaros)
[Convert problem] Visual C++ --> codeblocks.
 
Good day all, I've created a project in Visual C++ for school (posted an topic about that, but can't find it right now) BUT the assignment was to create it in ...
[8 replies] Last: @hanst99 working smooth! briljant! thank you very much. I even ... (by Leek007)
design a real time problem in C++ and solve it using stacks and queues
 
pls suggest me some real time examples and designs wherein i can use both stacks and queues in 1 example.
[1 reply] : In what context you have asked this, is it some programming assignment... (by tajendra)
programmatically moving window
 
I think my problem is that some black screen space is dragged behind. I am using an offscreend HDC. i have the following code... void game::game_movwin(W...
[5 replies] Last: Your patients immense. Dr. Disch, specializing in gastric bypass. (... (by shacktar)
by Ali89
How to find an object in a vector of objects ?
 
Hi there, The class packetId is implemented as follows. I have declared a vector of packetId and want to find an object of type packetId in that vector. As I c...
[2 replies] Last: Thank you so much dear Galik :-) (by Ali89)
True or False
 
Every "if" statement must have a corresponding "else".
[6 replies] Last: @hanst99, can I kindly ask how that program does what it does. I could... (by endLine)
Need help with arrays, pointers, objects
 
Hello everyone, I just joined the forums and I'm glad to see there is a specialized community that knows more than me about C++. I'll get straight to the point ...
[9 replies] Last: this->_topside = new Line(size,false); this->_rightside = new Line(... (by hanst99)
Two questions
 
Hello my friend cin in c++ means console input? and Why do we have the second error? 1- #include <iostream.h> int main () { char *p; char *str...
[2 replies] Last: Cin means "C++ Input" if I am not mistaken. "Console Input" wouldn't m... (by hanst99)
September 2011 Pages: 1... 7891011... 31
  Archived months: [aug2011] [oct2011]

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