General C++ Programming - December 2015 (Page 6)

Add an exception about bad_alloc in a vector of vectors
 
I have a .csv file that i have to read and create a matrix through vector of vectors. I have a problem about adding a try,catch if the matrix is too big to be s...
[3 replies] Last: Did you include the <exception> include file? Perhaps the problem is ... (by jlb)
by Nanyo
Database
 
Hello everyone! Thanks for the help in advance!!! I need to create a program that gets an input of 10 names(strings) and after inputing each name you also in...
[1 reply] : You really must try this yourself. (by ephraimr)
Reading a file in segments
 
Hi Everybody, I wish if somebody could help me in reading a file part by part. I am enclosing a sample file below. Actually my file contains some 7000 lines...
[3 replies] Last: Thank you guys. With your suggestions I tried to write a crude way of ... (by vidhya16)
Issue to find the tutorials or links for the sample code
 
I have been working with video files and my task is Read a video AVI file and Display the video without using OpenCV commands & library. plz help me I'm beginne...
[no replies]
by keyoh
Array of pointers to objects
 
Hi, I have a bunch of classes and objects, that I constantly have to implement into different functions. I wanted to simplify this and store pointers to the dif...
[3 replies] Last: Don't put something on the heap unless there is a good reason to. It ... (by dhayden)
Confused with header including.
 
Hello. I'm trying to create a program to create a forum of sorts. I've created 3 source files (cpp) and 3 headers. CPPs: Main_part.cpp Functions.cpp Bin_tr...
[2 replies] Last: That was exactly what I needed. Thank you very much. (by Kostaskol)
Array Lab
 
We're going to do an inventory management system. In the real world, this would use a database, not a file. Inventory contains item names (or description),...
[no replies]
by guru23
Recursive function
 
Hello, I would like to know how the output of this program is 12. I sort of get it, but not quite. Can someone please explain, mathematically, how this is ...
[1 reply] : Print inside the loop to give you an idea of what's going on step by s... (by booradley60)
Average value
 
I have a binary tree. It is NOT a binary search tree. I's just a simple binary tree. Each node has an integer value, and 2 links- left and right. What I must ...
[2 replies] Last: Thanks very much (by The suffocated)
Launch txt file from console app..
 
Hey all, I'm trying to launch a particular txt file from my console app.. So far i have tried: system("Notepad.exe", FULL_TXT_PATH); But pre-compiler its ...
[3 replies] Last: > Would this be the issues? Check it out with: #include <iostream> ... (by JLBorges)
Is it ok to use this as a global variable?
 
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
[3 replies] Last: Excellent, thank you. (by turtlesavage)
String declaration issue..
 
Hey all, I'm trying out my own way to vslidate a filename and i'm having problems from the start. The following line errors and says too many initializations o...
[3 replies] Last: Hey Chevril, yeah i noticed the 10 into 9 thing haha but thanks for th... (by hardwired)
by naji
Box of numerics
 
< int number1=5; int number2=4; for(int i=1; i<=7; i++) { if(rows <= 1) for(int i=1; i<=7; i++) { cout<< number1; } else if(i...
[1 reply] : Pseudocode: Set outer to the value that should fill the box border... (by cire)
What kind of heap is std::priority_queue?
 
I want to know the complexities of the std::priority_queue from the STL, so I in order to figure that out, I need to know what kind of heap is. I believe it is ...
[1 reply] : http://stackoverflow.com/a/2974501 (by cire)
by helios
priority_queue efficiency
 
I'm implementing a path finding algorithm and I'm having a hard time understanding the performance pattern I'm seeing. Currently, I have Dijkstra's using an de...
[9 replies] Last: My priority_queue was using deque, though. I tested both vector and de... (by helios)
Random number guesser
 
I don't understand my error, I get 2 every time. I coded this in C++ obviously. If someone could please help me that would be great, any help would be great. ...
[4 replies] Last: Have a look at the random class: http://www.cplusplus.com/reference/ra... (by integralfx)
object lab
 
Create a standard deck of 52 playing cards and list those cards on the screen, columns makes my life easier :-) Pause or "press Enter" after the unshuffled dec...
[no replies]
by a10e29
unqiue_prt declartion
 
Greetings and salutations! I've declared this: std::unique_ptr<std::vector<Piece*>> formations; The idea behind it was that it can hold anything derived f...
[2 replies] Last: I'm laughing at myself. Thank you my friend (by a10e29)
by Zakusa
TerminateProcess ( script not working )
 
hi i need help with this script below it should terminate a process liek if you type in "ROBLOX"(a game i play) i want it to terminate it so heres the script ...
[7 replies] Last: ya it worked i didnt reply in a long time (by Zakusa)
Logic error on user input?
 
Hey all, Could anyone please check my code and more than likely, my logic for this please? :) Basically, the user enters a musical note value in the format: A...
[2 replies] Last: Nevermind, i sorted it. I basically moved the last else if statement. ... (by hardwired)
December 2015 Pages: 1... 45678... 22
  Archived months: [nov2015] [jan2016]

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