General C++ Programming - March 2012 (Page 29)

Creating an iterator
 
So I have a template based class which I call MyStack<T> . I want to create an iterator so that I can iterate through my stack by doing something like this: ...
[1 reply] : You can either let the iterator contain a pointer to the stack and an ... (by Peter87)
Higher precision than double possible?
 
I'm using Visual Studio 2010 Professional C++. I understand that double occupies 8 bytes. Long double is a myth and isn't more precise because it also occupie...
[5 replies] Last: Since it's open source/GNU (ugh...) try doing what you should do with ... (by puzlanzen)
standard RegEx library doesn't recognize spaces? How to fix?
 
I thought I would attempt to learn the new stuff in C++11. After all, since it was declared to be the new standard, in a few years people less experienced than ...
[2 replies] Last: Wow... I feel stupid... I guess you are right. It was after midnight w... (by puzlanzen)
by Eyad
Wrong output
 
when i ask the user to enter two inputs of type "int", and he enters a "letter = which is of type char" the compiler calls the default constructor that initiali...
[3 replies] Last: EGAD Eyad! It sounds like you're complaining about a 90 minute resp... (by cnoeval)
[HELP] Im reading data from .csv and storing into arrays
 
If someone who knows this fairly well, id like to help along the way of doing this little project i have. My boss at work generates a .csv file for call logs...
[5 replies] Last: As others have suggested. Read an entire line. Parse that line. Apply... (by clanmjc)
Build errors on my code.
 
Error Image Link is here: http://prntscr.com/6ywz5 My code BOOL CMover::AddItem( CItemBase* pItemBase ) { #ifdef __TAB_INVENTORY if (pItemBase->GetPr...
[2 replies] Last: Question one, is m_Tabs a member of CMover? Question 2, is CMover par... (by clanmjc)
Help reading data from a text file
 
I'm writing a program to read 2 polynomials from a plain text file, separated by a line that contains the string "XXX". The first column contains a coefficient ...
[6 replies] Last: Do you absolutely need a linked list? Vectors are an easy/safe way to... (by Stewbond)
Function parameter passing mechanism in details
 
Hi, geeks!+) a)Please look at the sample code: int main() { int val = 50; int* ptr = &val; printf("%d %d %d", *ptr, val++, *ptr); return ...
[6 replies] Last: A specific compiler or interpreter may give a stable result, but this ... (by Duthomhas)
by zsukal
how to catch exception modifications to the array "const pointer"
 
Hello. I write function whose Modifying array (char), how to check that variable of function is non-const. implementation void modifying(char* arr){ // ...
[2 replies] Last: Hi First you define the parameter of the function to be const or not.... (by therockon7throw)
by beere
Is there a way to do something like switch cases with #includes?
 
Hello, im having a problem with a program. It solves different problems and i import the example problems using #include examplea.h Having multiple examples...
[1 reply] : You're not really clear on what you're trying to do: If you're trying... (by Kyon)
by navdiv
calculate mean of framewise calculated values
 
I would like to calculate the average of all the framewise quality measures(mse,psnr,mssim) calculated between stable and unstable videos : my code looks like...
[no replies]
by snova
regarding boost::interprocess::message_queue operation
 
Hi Everyone, Using boost::interprocess methods, I am communicating with different process. The followings are my scenario. Please suggest better ways to read...
[no replies]
LCD Display
 
A friend of yours has just bought a new computer. Before this, the most powerful machine he ever used was a pocket calculator. He is a little disappointed beca...
[1 reply] : Seems like a lot of work. I would just tell my friend he's being an i... (by cnoeval)
by codrgi
write a value into memory by dll?
 
i have an app that im launching, that app is using my dll, how do i write a specific value to a specific place in the apps memory? for example, i'm looking to ...
[1 reply] : By using just C++, placement new maybe what you're looking for. Palc... (by closed account zb0S216C)
having problems with the this pointer
 
Hello guys, Im stuck on a probably beginners error. They gave us the unlink function as Item* DList::unlink(Item* ptr) so thats what i put there but then wh...
[4 replies] Last: now it complies dlist->unlink(this) dlist is what i had wrong (by Svarrio)
help me convert this C++ program to Visual C++
 
#include <windows.h> #include <stdio.h> #include <conio.h> #include "dynamixel.h" #pragma comment(lib, "dynamixel.lib") // Control table address ...
[2 replies] Last: Ok I want to modify this program to make garphics user interface to ma... (by lo0lo0999)
Advanced Bit Operation
 
Hi! I am using an SPI (Serial Peripheral Interface)protocol. The package is 32 bit length. For send data I have to write to a 16 bit register for two time. ...
[3 replies] Last: Hi! I will explain better, I have to send 2 package of 16 bits to the ... (by guerrez)
by gumata
hashtable
 
how to remove an entry in the hashtable? please help
[1 reply] : Depends on how you made the hashtable. What does it store and how? (by Gaminic)
Can't find solution ???
 
Here's the question :- Heroes in Indian movies are capable of superhuman feats. For example, they can jump between buildings, jump onto and from running train...
[1 reply] : This is a standard breadth first search problem (BFS). BFS algorithm t... (by turingcomplete)
Vector of strings, what is the easiest way to do it
 
what is the easiest way to get a long list of names using a vector vector<string> nameslist("Tina","Aaron","Alan","Christi… "Katherine", "Simon", "Nick","C...
[4 replies] Last: Certainly the magic number has to go. std::vector<std::string> names... (by cire)
March 2012 Pages: 1... 2728293031... 49
  Archived months: [feb2012] [apr2012]

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