General C++ Programming - August 2016 (Page 7)

Vector out of bounds (1,2)
 
I cant see where am accessing beyond myVec vector in this function herebelow. Where could be the problem ? void Display_file ( std::vector<std::string> &...
[20 replies] Last: reading comma separated files: http://www.cplusplus.com/forum/general... (by closed account 48bpfSEw)
Deleting elements form STL list while iterating over it
 
Im trying to remove elements from STL list, but im getting a weird runtime error: "Exception thrown at 0x00CC417B in PhysicsEngine.exe: 0xC0000005: Access viola...
[2 replies] Last: OK i found the problem. The problem is related to something else, and ... (by vastrolorde)
Queue issues!
 
Hi guys, I have the short program below that reads three lines of strings from a text file. I have two cases of confounding results! #include <iostream> ...
[3 replies] Last: > I want to believe that you meant canonical instead of "canical" in l... (by JLBorges)
What is wrong with this? - Prints correctly first time then memory corruption.
 
It prints correctly on the first try. The second attempt prints garbage. #include <iostream> #include <fstream> #include <string.h> #include <stdio.h> #...
[1 reply] : Add the bold character: std::ostream& operator<<(std::ostream &out, St... (by helios)
SegFault in BSTs' remove Method
 
Hey guys, I recently started using a new data set with my BST class and SegFaults started popping up... It's happening somewhere within the recursive remove ...
[14 replies] Last: I tried writing remove() assuming that getParent(), getMin() and getPt... (by dhayden)
Division Problem!
 
I am dividing numbers like this: int cx = x / width*32; int cy = y / height*32; Width and height are both 64. x and y are 600. The problem should be 600/204...
[4 replies] Last: Thanks Borges! What an easy fix. I feel silly now. (by memerson)
A new programming website has opened!
 
Its a pretty old but however still on website. You probably didnt hear of it cuz we are a really small community which you ca join right now! Here you will see ...
[no replies]
by Hengry
"basic_string::_S_construct null not valid" error help!
 
I'm not sure why this error is showing up because I don't have a string that's NULL. int main(int argc, const char * argv ) { string dna_or_rna = argv ...
[2 replies] Last: Did you check that argc is 4 ? (by Thomas1965)
Will Vulkan replace OpenGL?
 
Hi guys, I was wondering if there is any chance that the new Vulkan API will replace OpenGL. If Vulkan is going to replace OpenGL, When do you think it will an...
[4 replies] Last: Khronos has a diagram in their overview presentation which explains wh... (by htirwin)
"-1" needed after a int variable, or is it an int var?
 
I'm trying to understand the use of a int variable used for a serial port number. (from RE232.H 2016, Example code has No "-1" used here -> http://cc.bingj.com/...
[5 replies] Last: Thanks Zhuge. (by Steve02)
Is it possible to combine OpenGL with C++ on a single window?
 
In a windows application, input is taken from slide bars, drop down lists and text boxes and the output is to be generated as a 3D image. Is it possible to use ...
[1 reply] : Think about this: is it possible to have a OS X, Android, or Linux app... (by keskiverto)
My C++ program in web
 
Note: I use Django. GitHub : https://github.com/ardamavi/Web-Satranc Project Page: http://www.ardamavi.com/2016/08/web-cpp-satranc.html I hope that helps...
[1 reply] : What is your question? (by kevinkjt2000)
DungeonCrawl movement issue
 
Hello, I have the following code for the DungeonCrawl game. For some reason, the movement function is not correct for the right and the down direction. Can s...
[6 replies] Last: Thank you, that really fixed the problem. :) (by mihaijulien)
[Builder 6] Save Label content to .txt file (1,2,3)
 
Hello. I want to save Label content to .txt file void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action) { Label1 -> Caption -> SaveToFile...
[43 replies] Last: @Thomas, we are not in the beginner section... @Necip, does it real... (by Thomas1965)
cin.getline not working properly in a loop
 
I have written the code to get context and noun from the user. In every case there is one context and multiple nouns. I am able to get the context from the user...
[5 replies] Last: Thanks a lot it worked (by adbharad)
RC4 encryption and newlines
 
Hello, I wrote a simple program that can encrypt/decrypt files using the stream cipher RC4: #include <algorithm> #include <fstream> #include <iostream> #incl...
[2 replies] Last: Thank you, works perfectly! (by DDomjosa)
by cj02
Provinces Of The Philippines
 
hi, can someone help me please... when i run my program... it only displays the first province... //This Program Will Gives You The Information Of The Differ...
[5 replies] Last: Don't do duplicate Topics, that was the point of kemort 's post. It i... (by TheIdeasMan)
name based factory
 
This is similar to a question I asked previously: http://www.cplusplus.com/forum/general/151106/ I am assuming that because function pointers that are class ...
[3 replies] Last: Hi, Have thought about this a bit more, just wondering about the purp... (by TheIdeasMan)
1 or 2 objects
 
In the following snippet am I creating one or two objects? Can post entire code if necessary. Foo obj; Foo &ref = obj; Foo * ptr_obj = &obj; ...
[2 replies] Last: Hi, Ok, I got it, thx. (by technologist)
_getch not doing what I want. Need to detect key presses.
 
So my goal here is to detect what key's are being pressed in a while loop until I break it with enter. adding on to my final message string like this: keypress...
[3 replies] Last: Detecting key presses in the manner you want depends on the operating ... (by closed account E0p9LyTq)
August 2016 Pages: 1... 56789... 12
  Archived months: [jul2016] [sep2016]

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