General C++ Programming - July 2010 (Page 7)

by pillow
How do you read an unsigned char?
 
I need to read in bytes and I can't get this to work: unsigned char ascii; while(cin.get(ascii)) { ... } I tried to static_cast<char>(ascii) but t...
[4 replies] Last: I believe that some architectures (like M68000) don't allow you to mix... (by kbw)
Multiple objects problem.
 
Hello world!! I need help with somethig that makes me angry every ime that i wnat to do it. Lets say that i got a class that have all the things that have a m...
[10 replies] Last: And if someone is interested in the sourcecode of doom. Here's a nice ... (by Nick Evan)
Linker erros with libraries
 
I'm trying to compile a program (falconview.org) and I'm getting linker errors for a small section of it. I'm using VS2010. I have hundreds of these errors, but...
[6 replies] Last: Thanks for the link. I tried disabling incremental linking/program opt... (by acarro01)
qn on comma operator
 
int a = {2}; cout << a << endl; cout << a << endl; cout << ( a *= ( a = 4, a *= a ) ) << endl; why does this code give me 32 instead of 6...
[1 reply] : This is undefined behavior because there is no sequence point between ... (by jsmith)
by Sahana
Type Conversion
 
I have 2 strings-string temp1="XYZ"; and string temp2="ABC";Now, I concatenate the 2 strings using the Expression-string perm=temp1+temp2; My question is, How d...
[2 replies] Last: Please use proper English and proper spacing. You can get a const ... (by Bazzy)
by soabnu
ERROR
 
hello every1...i had a problem with my C++..i recently installed d dos box 0.72 on my vista system. n each time after i try compiling my program it says Una...
[1 reply] : You don't have the correct library paths on your compiler settings. H... (by Bazzy)
First chance exception in Native C++ dll
 
C++ ntive DLL Code I have is first creates a thread to start aplication Vayu(inhouse app).Then Vayu starts up ,then data inside it gets processed.Issue I am fac...
[1 reply] : Since the exception is being thrown at a closing brace, that points to... (by helios)
Unable to initialize string in 64bit
 
Hi, I am encountering a strange behaviour in solaris10. I have a C++ code which is working fine when I am compiling it in 32bit mode. But when I a compile it...
[6 replies] Last: Yeah you are right regarding the initialization. We are acutally no do... (by Damodhar)
Delete references?
 
I'm using references for a game engine I'm making, and I was wondering if it was possible to use delete on references. Would it just be like this? instance&...
[6 replies] Last: Yes, I based it off of Game Maker, but not everything is implemented y... (by PiMaster)
by dkaip
I whant to make an open source bulk emailer
 
Hello. I whant to make an open source bulk emailer like sendermail, but in c++, wxwidgets, and codeblocks, so i am looking for an email class. Anyone if knows s...
[5 replies] Last: Thank's a lot. Just open it. (by dkaip)
segmentation fault.
 
Dear all, This code tried to read the text file and save in array. I don't know what's the root cause of "segmentation fault" in the attached code. Could...
[4 replies] Last: Thanks a lot for your quite clear explanation ! Best ! (by Junhui Liao)
HTTP POST req in C++; header problems!
 
Hi everyone, I'm a moderately experienced C++ programmer who's trying to do a little socket work. Don't ask why, but I'm to write a program which, w...
[no replies]
by raa
Saving bytes from given bits
 
Hello guys, I have a question and hopefully you guys would help me. I have an array of unsigned ints {0,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,1.....} How can I gr...
[7 replies] Last: It works! Nice! :) And just to be on the safe side you can make the un... (by m4ster r0shi)
by Null
More questions about exceptions
 
Hello, I have 2 questions: Is it possible to catch an exception if it's thrown by a thread? DWORD WINAPI Thread(LPVOID lp) { cout <<"Exception will be ...
[1 reply] : 1. No. 2. Don't use exception specifications. (by jsmith)
Assertion error.
 
Using this code gives me a "Debug assertion failed" when I close out of the program. Drawable.h namespace ec { ///////////////////////////////////////...
[6 replies] Last: Sigh... where is the sf::shape type defined? Right here: http://ww... (by helios)
destructors and heritance
 
Hi everyone! I try to delete a derived_class-object using a base_class-pointer. i read that i need a virtual destructor to do this properly but it doesnt seem ...
[12 replies] Last: I am sure it works in some implementations. But it could change with a... (by Galik)
Undefined reference to class::function
 
Hello! I've been working on a small project in my spare time, and I've run into a problem that I can't seem to figure out. It's a small game that uses a 2-dimen...
[5 replies] Last: Good catch! I totally didn't notice that. That seems to have fixed the... (by ItisMMX)
by Moooce
Classes and threading
 
I'm having a go at some multithreading with an operation that is quite slow, but can work well concurrently. My question is, is this the best/only way to make ...
[3 replies] Last: It can be a static member function, but you won't find a threading int... (by helios)
by everid
std::unique_ptr, std::bind, std::ref
 
Anyone knows where to find good reference to learn these things? Thanks.
[4 replies] Last: For std::bind and std::ref you can look up boost::bind and boost::ref ... (by jsmith)
by dolz
can i program a game ?? !
 
i want only a tutorial for how to make my first game in C++ but i can't begin because am don't find and i don't know a lot about c++ so if anyone can help m...
[5 replies] Last: I agree with Vexer - it's almost vital to understand the syntax first ... (by bluezor)
July 2010 Pages: 1... 56789... 20
  Archived months: [jun2010] [aug2010]

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