General C++ Programming - July 2011 (Page 17)

Adding char to an int
 
I was wondering how it was possible to add a array to chars to an int as the function bellow does. C...
[1 reply] : buf is not a char; it is a pointer to a char. buf+total is adding ... (by Moschops)
Sockets?
 
I was wondering why make an non-blocking socket? What advantage does it provide in comparison to a b...
[3 replies] Last: Thanks, that summed it up perfectly. (by TheCreator)
Wats the need of a header file?
 
Things can be done, without it to, its only needed for properly management of the code! Am I correct...
[1 reply] : When using a library that is already compiled, you need to provide the... (by Moschops)
I dont find any need of enums?
 
Coz I think, there are many options(like macro, or simply declaring a variable) to enums Am I corre...
[1 reply] : No. Besides the fact that they're assigned values automatically, they ... (by Athar)
When to use #define or const?
 
I was just thinking about some code I had written where I used the #define directive to make musical...
[5 replies] Last: Ah, thanks for clearing that up. Time to do a large amount of editing... (by Catfish)
Header file Inclusion
 
Hi Which is the better way to include header files. Suppose I have a project containing Example.h...
[1 reply] : Only include them in Example.cpp, of course. Why on earth would you cr... (by Athar)
by clros
C++0x, thread, promise and future
 
Hello! I am making a simple template class for communication with two thread in C++0x, using the ...
[3 replies] Last: I don't have <future> installed on my machine, so I'm afraid I can't h... (by h9uest)
by MiKom
Member function templates instantiation in gcc
 
Hi, I have a problem with class member function templates. It seems that gcc is trying to analyze...
[5 replies] Last: Wow, nice solution. Thanks. (by MiKom)
by Phiru
operator???
 
I am curious about "operator" My book that i'm reading is saying "bool operator==(struct A& val...
[2 replies] Last: Thank you mcrist!!! (by Phiru)
by Ares26
Help with the System() Function
 
Hello! I need help with my system() function so I can add arguments. Here is my code: #include "st...
[1 reply] : If you really want to do it that way, use sprintf() to put variables i... (by Zhuge)
by alhanz
Modify selected text from a textfile
 
Case Solved..
[5 replies] Last: Thx thou, I think I somehow managed to solve it!! Haha!! (by alhanz)
about c++ classes
 
is it possible that the parameters of the one function is globally used without using any global var...
[10 replies] Last: thanks to all of your replies. im doing it on all your samples before... (by xeroblast)
Include the header files in .lib
 
I am learning about .lib (static library) files and I have a big question: When we make a .lib proj...
[9 replies] Last: Oh, sorry. I typed it wrong. What has happened is I removed the heade... (by soheilghafurian)
by fsshl
no match for 'operator<<'
 
Dear c++ experts: usually the left side of << is ostream or stringstream. but can it be user defin...
[3 replies] Last: LB , Thanks your incitation. kooth, That book section 8.3 did not spec... (by fsshl)
Sorting by multiple attributes problem
 
Hi fellow code warriors, I have the following comparison functor : struct sizeSortDescFunct...
[7 replies] Last: (If the Sphere object just does a simple member-wise copy, then you do... (by jsmith)
Boost ASIO Serialization
 
Hey Guys, I have problems with serialising Objects of NET. Serialising works fine but when deserial...
[no replies]
Segmentation fault and new to c++
 
I am getting a segmentation fault whenever I uncomment the call to the method "removeDuplicates". An...
[3 replies] Last: That's not being flushed because it segfaults before the buffer is emp... (by Moschops)
by Luffy
Reading only part of the content in textfile
 
Hi all, I have a text file containing these: csc : -212 : 21July2011 salary : 2000 : 28July...
[8 replies] Last: Thanks. My problem solved. (by Luffy)
by Luffy
Code crashes while running
 
Hi all, My code crashes halfway while running till the EditCashFlow() portion. It will crash onc...
[2 replies] Last: My program crash upon hitting this line. cout << "Enter which en... (by Luffy)
Seg fault while accessing data created in another class
 
In my main I have: Volume* myVolume = new Volume(); Geometry* myGeometry = new Geometry(); ...
[1 reply] : Volume* myVolume = new Volume(); sigh, ¿Is there a good reason to d... (by ne555)
July 2011 Pages: 1... 1516171819... 30
  Archived months: [jun2011] [aug2011]

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