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

by Smoke
GNU_MP, Undefine reference to
 
The below friends operator are causing the errors like undefined reference to `operator>>(std::basic_istream<char, std::char_traits<char> >&, __mpz_struct*)' ...
[2 replies] Last: fixed it turns out it was missing the gmpxx library a the linking stag... (by Smoke)
What does" invalid operands of types `int' and `double' to binary `operator%' "
 
Hello, Im a complete newbie to c++, so i would appriciate any help. I keep getting these errors in my program. 37 invalid operands of types `int' and `double'...
[14 replies] Last: So, if you do not initialize the variables and the change is say 785, ... (by mjmckechnie)
What is a mutable operation?
 
I was reading about the thread safey of boost::shared_ptr, and it said the following: A shared_ptr instance ... can be "written to" (accessed using mutable ope...
[1 reply] : There's no deeper meaning. A mutable operation is one that changes the... (by Athar)
Simple stuff, need help plz? functions etc
 
Can anyone explain to me this code ? I wrote it but I copied some from another source. It won't compile due to a linker error in dev c++, but I'm sure I did it ...
[3 replies] Last: @Xerzi I read your post but didn't really understand what you meant bu... (by Noob1337)
Passing by reference
 
The following 2 programs seem to be paradoxical in the principal of "passing by reference" PROGRAM 1 =======================================================...
[1 reply] : That looks perfectly correct to me. In the second program n2 was chang... (by Galik)
Learn 2d array?
 
Hello!i want to learn completely 2d array which includes sorting,searching.So kindly please suggest me the book from which i could easily learn all about arrays...
[no replies]
by sqandr
Initializing pointers in a doubly linked list
 
What is wrong with my code? struct node { node *prev; int d; node *next; node(node*p,int i,node *n):prev(p),d(i),next(n){} }; struct list { n...
[5 replies] Last: C doesn't exist when D is created, so the value of D.next is wro... (by zerobandwidth)
Returning local memory as reference from function (1,2)
 
#include <iostream> ///define a matrix class ///this is a large object that can hold big memory class matrix { int rows; int cols; double **mat; ...
[25 replies] Last: Please ignore by above post. Multiple matrices can indeed be passed as... (by Indranil Chowdhury)
by Mummie
Help a noob out- differences between 3 graphic engines
 
Hello Gentleman and Ladies. I just want to ask a simple question on these 3 graphic engines for c++. Whats the difference between SDL, Allegro, and GTK+ and ...
[2 replies] Last: It really just depends on what you want. I would (and am) create an e... (by KyleMiles)
Sort a vector of Employee pointers
 
Hi, I am trying to sort a vector of Employee pointers and should display those values based on the name in an order.Below are the classes: //Company.h c...
[2 replies] Last: Hi JLBorges, Thanks for your response.It worked. (by sita kalidindi)
uart communication between zigbee devices
 
Hi, I'm trying to write a program which uses wireless XBee uart communication between microcontrollers to identify the location of a user within a residenc...
[no replies]
Permanent Data Storage
 
I am in 11th right now, so as part of the project I was trying to make a Movie Ticket Booking Application in a group. The problem was that when we close the app...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ (by Pravesh Koirala)
Octal to Hexadecimal
 
Hi guys! I am trying to find a way to convert directly from octal to hex. I found a lot of methods around the internet, but i didn't understand how and why i...
[6 replies] Last: Now about the solution. Octal to Hex conversion can be done by severa... (by Pravesh Koirala)
by Tresky
Multi-Map
 
I have read the reference on how a multimap can have multiple elements have the same key, but I don't understand how that is even possible. How would it know wh...
[2 replies] Last: OH!!! Sweet. Thanks. (by Tresky)
Help me! Why it doesn't compile?
 
#include <iostream> #include <cmath> using namespace std; int round(double number); // Assumes number >=0. int main () { double doubleValue; cha...
[5 replies] Last: Thanks everyone. It works. (by andrewwiles1994)
by Laveer
Simple problem...
 
For some odd reason this isn't working as I wanted it to... The code makes it self explanatory. void Form1::label3_Click(System::Object^ sender, System::...
[1 reply] : This is more of a .Net issue than a C++ one, seeing the syntax is iden... (by closed account o1vk4iN6)
rotating the digits in a number-c++ program
 
Hi guys ! I have to make a program that rotates the digits in a number by k positions to the right.I am not sure I understand it correctly. This is my code:...
[7 replies] Last: All he did was create a while loop for the number of digits to shift, ... (by closed account o1vk4iN6)
Inheritance, containers with base type, typecasting
 
hello, I have a class Node, and another one called TransformationNode : public Node in a function called updateTransform, I iterate trough a vector in the b...
[7 replies] Last: I have a functon called Graph* getGraph() in base, and a member Graph... (by afraidofdark)
SIGSEGV segmentation fault by allocating 8MB
 
Hey all, I was debugging my XOR algorithm and I found my program crashing when I tried a bit larger files. void encryptWidget::XOR() { std::string...
[7 replies] Last: Hmmm I see :) And Peter, you have no life because you solved 2 questio... (by xander333)
need help on dis for loop
 
guys i need some help i have dis program wch i took from dey net for my project n i'm not gud at c++ o as wonderin if ne1could help me out wid dis part of d fo...
[5 replies] Last: if should be //for(i=270;i&lt;271;i++) //{ outtextxy(190,270,"OUR P... (by bluecoder)
January 2012 Pages: 1... 1920212223... 36
  Archived months: [dec2011] [feb2012]

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