General C++ Programming - March 2016 (Page 2)

A GUI on Windows and Xorg. How to escape the command line?
 
I'm writing a program that has grown extremely fast. It is now time to overstep boundaries and take this thing to the next level, GUI. Unfortunately, I need to ...
[11 replies] Last: That's probably what I'm going to do, but I like having a full underst... (by RealGiganitris)
creating a struct
 
//CONSTRUCTOR // pre: d is the character data being counted, // c is the count. // post: allocates memory for a new frequency record // return: a refe...
[1 reply] : Why are you defining the structure inside the function body? Don't do ... (by LB)
2D array user choice selection, getting odd answers
 
Hi, I'm really new to C++, and whenever I see an exercise in the book I'm learning from I like to expand on it, or use it to build something else I'd like to se...
[6 replies] Last: Hi, yes, you could help me out with this project I've given myself. I... (by nostromo)
Struct constructor stores wrong addresses?
 
I'm doing a menu with few choices - the code is literally the same for all menu items, however one of the menu items (Software - Applications, 66. line) stores ...
[1 reply] : Calling std::vector::push_back() may invalidate pointers to elements o... (by helios)
Template polymorphism
 
I'm making a class which will provide a common interface to two very different implementations. What do you think is the best design pattern to use to achieve ...
[1 reply] : The left side could be rewritten like this without any breakage: str... (by helios)
Integration and Differentiation
 
I have an assignment for my c++ class at college and i wasn't able to go to class for the last week for medical reasons and i was looking for some help... th...
[1 reply] : Here are some ideas: #include <iostream> #include <string> #include ... (by Stewbond)
by nap 93
problem with sequential function
 
Hi, I was asked to write a function that reads from a sequential file and writes to another sequential file. Here is a description of what was given. The file p...
[1 reply] : It looks fine, mostly. You allocate arrays for reading the 3rd field,... (by kbw)
Work Checker / String Manipulation
 
Hi, im currently working on this problem. Task Description The menu for the local Lone Star Diner is as follows: COFFEE – $0.50 SODA - $1.00 MILKSHAKE ...
[4 replies] Last: First, let me congratulate you. Your code is well written for a beginn... (by dhayden)
Circular Doubly Linked List - Segmentation fault: 11
 
I'm trying to implement a circular doubly linked list but I keep getting a segmentation fault: 11 error (I believe it's because of the add and delete functions)...
[3 replies] Last: Can you post Circular_DLList.h? It would help if we could see the def... (by dhayden)
Permutation of String
 
Hi, I have been set a task to create an enigma machine in C++. I am currently stuck on a question that is as follows: 'Write a function that takes a strin...
[5 replies] Last: Hi, Thanks for your help. You were both right about the two strings n... (by closed account jT59E3v7)
by ayati
call non static member functions of template class from inside another class with instances of different types c++
 
Hi everyone, I'm having some doubts about the following code: #include <iostream> #include <boost/fusion/adapted/std_tuple.hpp> #include <boost/fusion/algori...
[5 replies] Last: > std::decay is not necessary, is it? It is. For instance, the type... (by JLBorges)
Function Not Working Correctly!
 
Hey everyone, used this site for a while and its really helped me a lot. However, i'm struggling to figure this out. I can't get the function "ratethegroup" to ...
[4 replies] Last: I would store the scores in an array so you can access them with loops... (by dhayden)
Convert string to const char
 
Can anybody tell me, how can I convert string to const char? I want to create a saving and a color changing system in my torpedo game.
[5 replies] Last: keskiverto's comments still stand: that's not a const char. It's a ... (by MikeyBoy)
Euler's Number Loop
 
I am trying to find Euler's Number to an accuracy inputted by the user in the form of (.001, .00001.....) i believe my error is with the math and the start p...
[1 reply] : The third post with the same topic :+( (by TheIdeasMan)
How does this work ?
 
int i = 100, sum = 0; for (int i = 0; i != 10; ++i) sum += i; std::cout << i << " " << sum << std::end; Output is 100 and 45. How is that...
[14 replies] Last: Write using namespace std; after include files so u dnt have to write... (by keskiverto)
Im trying to grasp c++ but i cant.
 
I have a overdue assignment of //The Yuba College Library would like a program to calculate patron fines for overdue books. Fines are determined as follows...
[1 reply] : int days=0; //number of days int paper=0; //number of paperbacks int... (by sohdas)
by Roson
Help me with creating Pacman
 
How do i make ghosts move at the same time as pacman? My group (where i'm the main programmer and logic guy) has decided to re-create Pacman..... i've got th...
[2 replies] Last: Thank you sooo much for the article..... But how do i use render and p... (by Roson)
A problem with PlaySound
 
Hello, I am currently doing a project, and part of it requires a sound to be played. Here's the code fragment that's troubling me: PlaySound(L"C:\\Windows\\M...
[6 replies] Last: I found the problem. The guy who sent me the files didn't convert the... (by closed account NUCkSL3A)
Code::Blocks 16.01 problem
 
Whenever I try to build and run a project I get a dialog box that says,"It seems that this project has not been built yet. Do you want to build it now?" I'll cl...
[6 replies] Last: but now through a fatal error: iostream: no such file or directory..... (by jlb)
vector emplace function
 
how can i enable this function via compiler setting?
[11 replies] Last: There is no "lol" in the equation. You either know the tools that you ... (by keskiverto)
March 2016 Pages: 1234... 23
  Archived months: [feb2016] [apr2016]

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