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

Int, long int, and string
 
I have a simple question that im not sure of. When do we know when to use int, long int, and string....
[2 replies] Last: http://www.cplusplus.com/forum/beginner/110492/#msg603267 (by JLBorges)
by Niven
A* Search keeps crashing
 
I'm attempting to implement A* search in one of my programs, but everytime I run it, it crashes. Rel...
[3 replies] Last: > the queue would end up holding enough data that the stack ran out of... (by ne555)
Access Reading Violation
 
Im working on a BST homework, and I have been doing alright, but I keep running into this error that...
[3 replies] Last: My code is quite large. It's actually why I shrunk it down. But I will... (by Bonster)
for loop help
 
I have this for loop that does this: let say n = 8 and node = 4 n: id: 0 1 2 3 0 ...
[1 reply] : I don't know how to explain it =..=. So is this what you want? #in... (by lsk)
Calculate variance in C++?
 
I am using the valarray function to take the numbers in myarray, and subtract them from the mean to ...
[1 reply] : Why can't you just myarray -= mean; ? Then print it, and then use it ... (by Duthomhas)
How to read files inside a folder using the value from another input file
 
Hi. I am currently doing my assignment and it requires me to open a folder, read a file, and then op...
[no replies]
Puzzled about virtual function using in pthread
 
Hello. I write a job class base to do some background work using pthread, but I encounter some stran...
[no replies]
Rehashing the Matrix
 
Hey guys, I'm new here so forgive me if I'm doing this wrong. I have this assignment where I hav...
[1 reply] : Here is the source code for the class #ifndef SPARSEMATRIX_H #define... (by theguy920)
by tcmn
returning the number of elements in a list
 
I am given an array with n elements but need to write a function where it returns n-1 elements. Do I...
[5 replies] Last: The basic principle is: index of current node = 0; while (index of ... (by Duthomhas)
Need help with age finding program.
 
The problem is that I need to figure out the user's birthday in months, days, hours, and minutes fro...
[3 replies] Last: Oh, okay. Wow. That's way different than what I had. I'll try workin... (by nibiruis)
confusion about reference and pointer
 
int myvar = 5; int * ptr = & myvar; int & rfr = myvar; void funS(int Spar){}; void funP(int * ...
[3 replies] Last: Thankyou guys yes this does help a lot I will figure out timely when i... (by danicpp)
Assigning Random Value
 
Hey guys, here is my issue. As shown in the code below, I'm using getline, and stringstream to assig...
[6 replies] Last: No worries, we've all been there! Ha (by ColtonBoyd)
Interesting use of auto to make a foreach macro
 
I thought I'd display my fun use of the new C++11 auto keyword to create a compile time foreach. I...
[2 replies] Last: Oh snap! (by flamewave000)
by bw119
outputting a partially filled array onto a text file
 
I have a partially filled array and I want to put that into a text file. Say I don't know how partia...
[1 reply] : You're going to have to determine how many entries are in the array. ... (by AbstractionAnon)
Initializing static member just once throughout
 
Here I'm trying to initialize PersonFactory::ethnicSurnames just once for the entire run of the prog...
[5 replies] Last: What I meant was if it was initialized outside the class as: const... (by prestokeys)
by LMUZZY
Need better understanding + need to solve an error.
 
I'm learning C++ off of this very website, and i'm up to this section : http://www.learncpp.com/cpp-...
[4 replies] Last: Thanks, got it working perfect now =D (by LMUZZY)
Help using STL Properly
 
Hello everyone! I am in need of some help with a homework assignment. It's basically creating a ...
[7 replies] Last: > Can someone offer a stepping stone? > I'm good at figuring it out i... (by JLBorges)
Seeing a Memory Leak in Task Manager
 
Hey, I created a program and I didn't think I was freeing dynamic memory correctly so I opened the ...
[1 reply] : From what you described it seems that you do indeed have a leak, that ... (by Z e r e o)
vector<vector<Player>> iterator
 
I am writing a tennis tournament simulator. I have two main classes to help me achieve this, a 'Play...
[2 replies] Last: Thanks for the quick reply. If it helps, the class declaration for Tou... (by whitebloodcell)
Fill a SAFEARRAY with BSTR values and print to console
 
I'm attempting to fill a SAFEARRAY of 10 BSTR with the value "test" and print out to console the val...
[no replies]
July 2014 Pages: 1... 56789... 26
  Archived months: [jun2014] [aug2014]

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