General C++ Programming - June 2009

: error LNK2019: unresolved external symbol
 
Hi, I'm implementing a CORBA wrapper in C++ with Visual C++ 2008 and Borland VisiBroker 8. As you can see below, the compilation process was successfully exe...
[8 replies] Last: Let me briefly describe what my program is suppose to do. It might giv... (by ccimuam)
by nanger
How to copy a certain number of bytes from a file
 
I have a video file video.yuv and I want to copy the first 117596160 bytes in the file and make a new file using these bytes how to achieve this goal? than...
[3 replies] Last: http://cplusplus.com/doc/tutorial/files/ (by CManowar)
Preprocessor; Clever #defines; not working
 
I know this isn't a great programming practice, but I have been messing around with the preprocessor in an attempt to become much more familiar with how it work...
[2 replies] Last: That looks like it may be just what I was looking for actually. Also, ... (by officialhopsof)
Errors in C++
 
#include<iostream> using namespace std; void main(){ int qty; int sp; double sv; double disc; double netsv; cout<<"please enter quantity"<<endl; cin>>q...
[3 replies] Last: you have to click on "Build" from menu and then click on "Clean Soluti... (by CManowar)
by romasi
HEAP CORRUPTION with Dynamic Arrays
 
I'm using VC++ 2008 and when I create a pointer as follows: unsigned int size = 3; char *string = new char ; and print the size of the string using str...
[8 replies] Last: @romasi. Yes. In your first example, you actually allocated memory f... (by kempofighter)
Converting MBCS to UTF-8
 
I'm working on a project in VS2008 that compiles in MBCS but I need to work with some UTF8 string in order to communicate with some web services. I've worked ou...
[1 reply] : #include <cwchar> #define BOM8A 0xEF #define BOM8B 0xBB #define ... (by helios)
Heap exhausted far too quickly
 
Some may recognize this program from earlier posts - my principal problem is to allocate very large arrays for use in the program. The two large arrays are int ...
[4 replies] Last: I seem to have identified the problem and you are correct, there is a ... (by Dr Lazarus)
Searching a file
 
Hi programmers. I need code for searching a file. Example --------------------------------------------------------------------- Enter file name: xyz.bmp Lo...
[4 replies] Last: Thanks almos. (by AR Khan)
by tioi
ATL project
 
Hi, I followed along the indications, step 1 and 2, at http://msdn.microsoft.com/zh-tw/library/599w5e7x(VS.80).aspx. I created a ATL porject, and then added ...
[no replies]
operations involving arrays
 
a.) filling or storing elements b.) retrieving elements c.) reading an element d.) Replacinbg an element e.) sorting the elements f.) copying an arra...
[4 replies] Last: Check out the algorithm references here: http://cplusplus.com/referen... (by kempofighter)
Comparison function for sorted container searching
 
Dear C++ and STL experts, As the title suggests, I have a problem relating to searching a sorted vector using a comparison function. Code compiles OK, but I h...
[5 replies] Last: I have a couple of suggestions. First, you don't need to use the type... (by kempofighter)
by cshong
C++ password input on BOTH WINDOWS AND LINUX
 
I want to write a simple command line password input program. When the user input a password, the program must display "*" to cover the password, or do somethin...
[5 replies] Last: You are trying to do something that is platform-dependent with the s... (by Duthomhas)
What's equivalent of fflush( stin ) in C++?
 
Hi! In C language we can empty input buffer by calling function fflush( stdin ); after scanf(); , but i doesn't work when we use it after cin. So how c...
[6 replies] Last: Sorry, I wrote o stringstream instead of i stringstream . I fixed... (by Duthomhas)
static vs. global
 
Does static variables have any advantage with respect to performance, over global variables? If I could use either static or global, which one should I prefer?
[3 replies] Last: Thank you. (by n4nature)
by aazz
resize for image bitmap ???
 
hi I need source code VC++6.0 to resize bitmap (console), not MFC intput : 1. path file bmp 2. scale output : path file bmp. sorry, I needing hurry. ...
[3 replies] Last: Just use StretchBlt() (by george135)
string to TCHAR
 
I'm writing a WinAPI program, and I need a TCHAR variable for my CreateWindow() function. I want this TCHAR variable called QuestionLine to hold a string. But I...
[1 reply] : A TCHAR is not a string. It's a macro that's defined as a char or wcha... (by helios)
Program runs under debugger, fails using command line
 
I have written a command line program that, up until recently, had been built and tested using a 64-bit compiler. With a 64-bit build, this program runs great, ...
[1 reply] : Sounds like you've come across the much feared Heisenbug. Try running... (by helios)
matrix allocation never throws bad_alloc!!
 
If I try to allocate more memory than I have (ram+swap) for a vector a bad_alloc exception is thrown. However if i do the same for a bidimensional array no exc...
[5 replies] Last: I don't think you need to reboot. The worst case scenario is the kern... (by jsmith)
by R0mai
What is the advantage of std::stack ?
 
What is the advantage of std::stack ? I can't say any advantage only disadvantages : -It doesn't allow to access the non-top elements : so debugging is imposs...
[2 replies] Last: The only advantage is that "std::stack" is more expressive than "std::... (by jsmith)
Defining Array Of Pointers to String
 
I am begining computer science student and I am trying to learn how to create an array of pointers to point to an array of strings. I plan on sorting the pointe...
[4 replies] Last: Your code is fine. You're not doing anything wrong. Using strcpy()... (by Disch)
June 2009 Pages: 123... 13
  Archived months: [may2009] [jul2009]

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