General C++ Programming - January 2014 (Page 21)

Nested Aggregate Initialization
 
Looking at this sample: #include <array> template<typename T, uint32_t X, uint32_t Y> class MatrixImpl { static_assert(std::is_integral<T>::value || std:...
[1 reply] : The last one actually doesn't compile under strict C++11 rules test.... (by Cubbi)
Randomizing string placement in an array
 
I need to take my string of 6 words, then scramble them into a different order, then output to the console. string line1 = {"I", "Can", "Do", "That", "Hold",...
[1 reply] : You can use std::random_shuffle in the <algorithm> header: http:/... (by long double main)
Need help please
 
Hey, I have been learning c++ for a couple of months and I have been asked to make this "If you show me that you can create a simple app that has a youtube view...
[5 replies] Last: Google "trolltech qt" and download their framework. They have examples... (by Duthomhas)
Readonly class variable (tensor) c++
 
Hi! Unfortunately c++ doesn't have a dedicated command to define a readonly variable. Usually we solve the problem like this: class A { double _x; ...
[18 replies] Last: > The set_positions function takes un-named parameters, > so unless I... (by JLBorges)
by Greedy
Array Help. Please Help me.
 
Look at this Problem: Please help me, Figure this out using [TURBO C] Create a program that will let the user input an amount in the form (367). The Program...
[7 replies] Last: Thank you for this. I owe my life to you. :) Ill promise I will be a b... (by Greedy)
address book class members
 
How can i make it so that a user can create as many new entries as theywant, then delete any that they don't need anymore. I know this has to do with construtor...
[no replies]
Unable to receive data from serial port
 
Currently I try to write a serial port communication in VC++ to transfer data from PC and robot via XBee transmitter. But after I wrote some commands to poll da...
[no replies]
by Danyal
What is the problem with the delay function. compiler is giving Error on that inappropriate call of delay function.
 
#include <stdio.h> #include <iostream> #include <conio.h> #include <string.h> #include <stdlib.h> #include<dos.h> #define LEFT 1 #define RIGHT 2 stru...
[1 reply] : What is the problem with this code. 1) Using deprecated header nam... (by Catfish666)
LL1 parser problems
 
Hello to everybody! i have difficulties in managing my code, maybe in understanding of LL1 parcing I have to do an LL1 parser for these productions : S->...
[no replies]
by Kauto
Sorting Diagonally
 
Hello, I have a question about sorting a 2D array. I've looked at many websites and solutions but none fits what Im looking for. Lets suppose I've got the fo...
[10 replies] Last: I cleaned up your code some. And I added a lot of comments for you to ... (by Duthomhas)
Sum of the biggest numbers in a triangle
 
Hi! After trying to understand the problem i finally gave up. The problem requires me to calculate the sum of the biggest numbers in a triangle. For example...
[3 replies] Last: I think that you should use a different approach. As you have done, in... (by thewitchking15)
by Greedy
Hey guys. Need some Loop Help.
 
Hey Guys. I needed a loop that asks the user if he/she would like to compute. [turbo C] Thank you and Happy new year~ :) Here is my code: #include <st...
[2 replies] Last: before creating any program you have to check it on daily routine and ... (by thefasninja)
by Cpper
The @ is not moving.
 
#include<iostream> #include "windows.h" using namespace std; bool loop = true; void update(int px){ for(int i=1; i>41; i++){ if(px==i){ co...
[9 replies] Last: how it is moving :P nice program... (by thefasninja)
problem with erasing element from a std::set of pointers
 
Dear all, I have a problem with set, something very weird happens. I have a std::set of pointers, in which I use a personalized comparator. The personaliz...
[10 replies] Last: Dear all, I have found the origin of the bug!!! In short, because I ... (by panecasareccio)
Having problems with OOP C++
 
Hello guys! Happy New year! I am having some issues with the following code, I am just not able to see where I am wrong. Can you please help me? Thanks in advan...
[no replies]
by Cpper
The @ can't move to left
 
The @ can move to right but not to left. #include<iostream> #include "windows.h" #include<string> using namespace std; bool loop = true; void upd...
[3 replies] Last: #include<iostream> #include "windows.h" #include<string> using name... (by Cpper)
i think it is related to using type conversion operators
 
the following code prints like: 98 a 99 b . . . . 123 z what is the problem with the code, please answer? int main() { int iii = 97; while (iii ...
[2 replies] Last: k.got it.... there were other mistakes also in the code, now i sorted ... (by praneshiitm)
sorting array in ascending order
 
something is wrong with this code.it prints 10 20 40 50 30.please help #include “stdafx.h” #include #include using namespace std; int main() { in...
[1 reply] : Here it is indented: #include “stdafx.h” #include #include using... (by Sirolu)
by Juicej
3D snake
 
i want to draw a 3D snake in opengl.. i can't get nothing out of my search to make a start.. can someone please give me a strong idea on how it is made or point...
[4 replies] Last: thanks.. cause i started realizing that when it comes to 3D all this g... (by Juicej)
General Iterator std::map Problem
 
I'm having trouble getting some code to work; I do not know for sure why, but I think it has to do with the way my compiler (TDM-GCC) evaluates a map iterator. ...
[7 replies] Last: Wow I never knew about inheriting constructors in C++11...I need to re... (by Hippogriff)
January 2014 Pages: 1... 1920212223... 25
  Archived months: [dec2013] [feb2014]

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