General C++ Programming - September 2015 (Page 9)

Vector curly braces initialization list
 
In a textbook I am reading, the author initializes a vector using initialization list using curly braces : vector{ numOfElements, -1 } to initialize a vector...
[4 replies] Last: > But even in C++11, this creates a two item vector containing {128, -... (by JLBorges)
i have no idea, tranlating psuedo code.
 
How can I translate this into a program? Set a Boolean variable "first" to true. While input value is not negative If first is true ...
[6 replies] Last: I would seriously suggest reading this very carefully http://www.cplus... (by shadowmouse)
Soccer Score
 
...
[no replies]
by yj1214
Moving undecorated window (GLFW)
 
I'm trying to solve this problem for about a week but I still can't figure out what the problem is. void moveWindow(GLFWwindow *window){ if(mousePr...
[5 replies] Last: You need to get relative cursor position compared to where it was last... (by NoXzema)
by Andym
Writing to text files
 
so let me ask these questions to see if I can figure out my problem. When I open a text file in a function, it stays open for the duration of main? I know i...
[18 replies] Last: Can anyone please tell me why that each time I write the "TextToWrite"... (by Andym)
by jen98
Case not working
 
In this program the case 4 of report function is not working.It directly executes the default.All othere case executes properly.There are othere functions also....
[2 replies] Last: You can't define a variable inside a switch statement unless it's with... (by dhayden)
illegal else without matching if
 
i have looked up past discussions about this and i have retyped a few things to try to make it work but i cant figure out why its giving e this error. please so...
[1 reply] : Could you apply code tags? http://www.cplusplus.com/articles/z13hAqkS/... (by Zhuge)
by Andym
matching one string to another
 
I know that I can use istringstream to match the text from one text file to another but I just cant wrap my head around how that would look in code. I need hel...
[5 replies] Last: I need to search for a match of course numbers and then get the credit... (by Andym)
by mkb555
Trouble returning a char array
 
I have a function Solve(const char first , char dar ) that needs to return the full dar array. I've tested this function and it correctly creates dar to what ...
[2 replies] Last: Ah, you're right. I've been reading the function's description wrong. ... (by mkb555)
C ++ program to manage a game
 
I came late to a software engineering class, and i havnt really gotten into the subject,my class is to make a game. I am to make C ++ program which manages a...
[2 replies] Last: Analyze conception coding , look for UML (by Ericool)
Code coverage tool for tests
 
The project that me and my colleagues are working on is a multithreaded C++ client-server application (we use MSVC as our compiler). We do not have unit tests,...
[1 reply] : There is bullseye coverage but i dont think its free (by Ericool)
If while loop won't end
 
When I run this it gets the sorting right but it runs though each one and I can't make it stop when it is correct. This is driving me crazy any help is apprec...
[3 replies] Last: use && rather than || (by claudeyboy)
Hyperlinking programs.Urgent.
 
So. I've been working on this school assignment and I wanna know how I can hyperlink two cpp files. For example, if(condition==true){ hyperlink to true.cpp...
[4 replies] Last: Glad I could help. :) (by Peter87)
HTA or C++
 
Hello All, I require to create a tool to showcase the GUI that changes its screens on the basis of a change in registry key value, i.e. If there is any chang...
[no replies]
NES to Neural Network
 
Hi guys! I would like to ask is it possible to get an input from a NES to a Neural network? I saw a lot of videos in youtube like MarI/O, a Neural network with ...
[2 replies] Last: Might be slightly easier if you use an Emulator that has built in scri... (by Hippogriff)
Calculating the total number of grains of wheat and squares needed for x amount of wheat
 
There is a story of the inventor of chess. The king wanted to reward him with riches, but he only asked for the following. One grain of wheat for the first squa...
[6 replies] Last: Don't get confused by my last post. It was mostly aimed at MiiNiPaa. ... (by Peter87)
by Andym
Help extracting line from text file
 
ok, so I've been running in circles for a while and I really need help with this. How do I extract the line of text from the file? I can print the contents of...
[4 replies] Last: First of all you are doing loop wrong. your code should be: while( ge... (by dwarak17)
Trying to work out how to use eof to read in characters to a dynamic array from console.
 
I created my own string class which uses dynamic char arrays to store data. the problem is, i need to add a function which will receive input from the consol...
[1 reply] : You can use array::size(). It works almost the exact same way as strin... (by YFGHNG)
help-please
 
...
[8 replies] Last: @TheIdeasMan: oh ok thanks for the that. I knew something looked weird... (by YFGHNG)
Copying code from this site
 
Hi, I was wondering if I have the rights under this site's license to copy code. For my specific example, I would like to copy the code here: http://www.cplusp...
[1 reply] : Yes. The site owner has specifically indicated that he expects that. ... (by Duthomhas)
September 2015 Pages: 1... 7891011... 21
  Archived months: [aug2015] [oct2015]

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