General C++ Programming (Page 6)

HOW TO READ AND DISPLAY A SPECIFIC STRING FROM TEXT FILE AND DISPLAY TO SCREEN.
 
i would like this code to search through the textfile for data a user will specify at runtime. Then ...
[1 reply] : Hi, Please use code tags: http://www.cplusplus.com/articles/z13hAqk... (by TheIdeasMan)
string problem
 
#include<iostream> #include<string> using namespace std; int main() { string s; cin>>s;...
[2 replies] Last: Your for loop is wrong. for(int i=0;i<l;i+3) I guess you want to in... (by Thomas1965)
Is there significantly more overhead repeatedly launching a thread than just having one running constantly?
 
I'm not looking for high performance as I am managing lots of TCP socket connections and not a UDP t...
[9 replies] Last: I forgot just how fun you guys were. (by devonrevenge)
Matrix generator for a specific determinant
 
I tried to generate a matrix with the code below. It works, but it has some isues. One of them is th...
[10 replies] Last: Yeah, not a good idea... I really need det(M)=1 or -1. If you still w... (by Octanny)
Getline function error
 
Maybe it's just me but for some reason when input the size of the string array I can really only inp...
[2 replies] Last: Holy crap I never even knew that. Dang you got some good knowledge and... (by rabster)
Char to int (MinGW)
 
I don't know if it matters but I'm using MinGW compiler. I have created a GUI program using Win32 AP...
[18 replies] Last: Solved! Guys the problem was sooooooooo simple and I wasted hours. The... (by TheSocket)
How to do this?
 
I have to solve the following problem in C++ and I have no idea how to do this... "A parent proce...
[1 reply] : What are you having a problem with, the GUI or the prime numbers? For ... (by pnoid)
Divide operand
 
To anyone who may know how to help; I have a line of c++ code that was giving me a wrong answer w...
[2 replies] Last: I think I understand now and where else I may have issues... thanks (by benkitt)
Images in graphics.h
 
I am trying to display an image and it seems that readimagefile doesn't work... I am not sure why. C...
[5 replies] Last: What IDE and compiler are you using OP? (by Computergeek01)
so, is there an easier way to create maps for say, a pac-man clone than hard coding rectangles?
 
Im not even asking for pseudo code or anything, just a concept. I thought pac man would be a good pr...
[3 replies] Last: there are other objects, such as the dots and the sprites themselves.... (by helios)
Movement of Knight in Chess!
 
Hi everyone, So in chess, the knight moves in a very special way: either: two squares forward and...
[11 replies] Last: Yes, apologies, I studied English long time ago in the US.... ☺ I di... (by AmmmG 01)
Writing object into binary file
 
I have an object declared as such: #include <iostream> #include <fstream> #include <string> ...
[10 replies] Last: Either approach could be made to work but writing only the attributes ... (by Computergeek01)
Possible movement of Knight in Chess.
 
I have to do a program where the user is asked to enter the 2D position of the Knight on the Chess ...
[1 reply] : #include <iostream> constexpr int N = 8 ; // board size using board_... (by JLBorges)
Opinions on coding of Parallelism in C++
 
Hey All I'm working on some exciting new Parallelism tooling for C++ with the University of St Andr...
[2 replies] Last: In the tool we're creating we are building upon and extending these me... (by craigmanson)
by lilaii
Shared memory with services
 
Hi, I have two applications, one 32 bits and one 64 bits talking through a dll which I made in 32 a...
[no replies]
Quick Dirty Command Line Parser Isn't working
 
Hi, I made a quick command line but not sure why it's not working? It seems the for loop is wrong....
[1 reply] : The first argument (0) is always the executable (and path). So start t... (by coder777)
! File handling in C++ !
 
Please tell me what this line do-> while (f1.read((char*) this ,sizeof(park))); Please tell w...
[1 reply] : this : http://www.learncpp.com/cpp-tutorial/8-8-the-hidden-this-poin... (by coder777)
Why to write int(in_time.ti_hour) ?
 
cout<<"Park-in time: "<<int(in_time.ti_hour)<<":"<<int(in_time.ti_min)<<":"<<int(in_time.ti_sec); ...
[2 replies] Last: Is ti_hour a char type ( char , unsigned char or signed char )? The... (by Peter87)
Pointer can become array ?
 
Example if i write int* a; a =5;can ?
[2 replies] Last: You can use array syntax with pointers. a is the same as *(a + 1... (by Peter87)
Help!! Debugging issue
 
Can I get a set of fresh eye on this bit of code... the getline function is not letting me do the u...
[2 replies] Last: You just need to include a line before the getline function is called ... (by Stalker)
Pages: 1... 45678... 22
  Archived months: [dec2015]

Cannot post in this page. To post a new message, go to the first page.