General C++ Programming - May 2011 (Page 6)

by SeBeQ
Probelm with std::vector in function
 
Hi I have code: void Searchfile() { HANDLE hFile; WIN32_FIND_DATA wfd; std::vector<HANDLE> handles(100); // <- this is shutdown line ... } I...
[3 replies] Last: I get another issue: I have struct HandleStructure{ HANDLE hHandle;... (by SeBeQ)
by NGen
Embedding a File in an Executable
 
I've written my program entirely and, rather than putting the thing in a ZIP, I'd like to embed the two resources (a shader and an image) into the executable. I...
[4 replies] Last: I'm looking to do a similar thing. I'm working in VS Pro 2008, howeve... (by stormyk)
deque vs istringstream
 
I am developing a small scripting language in C++ as a project. I am currently working on the Lexer and have a few concerns about overhead. Right now I am scann...
[1 reply] : They both increment an internal counter. There are no expensive operat... (by helios)
by gizzmo
STL iterators
 
Can I use iterators from STL as int type numbers? Lets say I have a vector of some objects (like in a dictionary I have words). To access each element of tha...
[2 replies] Last: I think you want to use a std::map<int, someOtherType>, the iterator p... (by aquaz)
by HenriK
Trouble with inheritance once again - what is the problem?
 
Hi, it´s me again, this time having a problem with inheritance itself once again. Here´s the code: #include <cstdlib> #include <iostream> #include <s...
[6 replies] Last: http://www.acm.uiuc.edu/webmonkeys/book/c_guide/1.2.html#const (by kbw)
User Defined Matrices
 
For my program I need to get a 2D array or matrix to have a user defined size. Which means that 2 variables will essentially store inputs from user and then the...
[2 replies] Last: check this template out template <class T> T * new2D(T dummy, int row ... (by gautam jha)
Error: Run-Time Check failure #2 stack around the variable x was corrupted...(Urgently please)
 
Dear i need your help very urgently. Before this program was running without any error but now it is giving this error Error: Run-Time Check failure #2 sta...
[6 replies] Last: In VS2005, In Debugger > Exceptions, you can enable breakpoints for ea... (by bartoli)
Number of consonants
 
Help me please! I want to make a program that displays the word with the maximum number of consonants from a sentence.
[11 replies] Last: This sounds like homework, so I'll give you an obfuscated example that... (by packetpirate)
To write execution results in a txt file....
 
I want to store the intermediate results in text files. Requirements: - file can be open with in different classes and functions of my Project - results sho...
[2 replies] Last: And inside Log(), add a lock for the writing to the file in case you c... (by bartoli)
Good or bad idea for Linked List class?
 
I've been working on a Linked List class and I've made it doubly linked now. I'm wondering if this would be a good idea for overloading the operator. Instead ...
[18 replies] Last: I strongly advice you not to make a random access operator for a list... (by moorecm)
fclose & fopen VS freopen
 
freopen is supposed to close a file and open another right? then why not use fclose followed by an fopen I tried this appraoch with a normal file and it worke...
[5 replies] Last: I"M SORRY I had put another example for example one than the one I mea... (by AhmedKamal)
Array Excercise
 
Hi everyone! I am new at this forum. I need basic exercises on Array, can someone give me this kind of exercises e.g. to get average age of ten student of a cla...
[1 reply] : http://www.cplusplus.com/forum/articles/12974/ Look for "arrays" in "... (by hamsterman)
How much easier is Java compared to C++
 
I know that Java is easier than C++. What I'd really like to learn is C++, but I'm having a hard time in school and am thinking that it may be easier if I just ...
[10 replies] Last: learn other languages first and then come back to C++ for OOP, Java o... (by kfmfe04)
by ddub76
Image recognition then output to Excel
 
I have very little experience of computer programming, but want to create a program that can read the wins/losses made with each spin on a casino slot machine a...
[1 reply] : How hard would it be for someone with very little exerience of comput... (by helios)
help with struct and pointers
 
Ok this is my situation I have this header file: struct dir { char name ; int root_dir; int has_children; int num_children; int offset_...
[5 replies] Last: Don't forget to delete fat at some point, or your program will get t... (by Duthomhas)
direct x beginner question
 
I posted the entire code so it can be ran. My triangle, as it approaches the top of the windows, looks like it goes off axis. Is it? or is it just the posit...
[2 replies] Last: maybe it is just me then, thank you. (by closed account zwA4jE8b)
To get division result of int in a float....
 
To calculate percentage i am dividing int but result is always 0. float sameEdges_Perc, exteraEdges_Perc, missingEdges_Perc; int TotalSameEdges, TotalEdges...
[1 reply] : sameEdges_Perc = (float)TotalSameEdges /TotalEdges_incr*100; ... (by Duthomhas)
help with strtok function and pointers
 
I have a vector declared as: vector<char *> records; Then I have the following code to get a line from a file; while(!archConfig.eof()) ...
[3 replies] Last: You should use a split function for this kind of thing. If you don't w... (by Athar)
by Veltas
Memory leaks
 
I've constructed a little dynamic object manager but I'm not sure if it's correctly allocating and deallocating. I've checked the code over and over and I know...
[19 replies] Last: I appreciate it kbw, if it's any consolation, however I've used the Va... (by Veltas)
May 2011 Pages: 1... 45678... 32
  Archived months: [apr2011] [jun2011]

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