General C++ Programming - July 2016 (Page 9)

vector problem
 
hi, I need the help! Write a program that reads an unspecified number of lines of text from STDIN, terminated with EOF. Each line will contain one single word ...
[1 reply] : Hi, Well, best place is at the point where you realise this isn't a ho... (by Naughty Albatross)
INPUTTING 2D array
 
How can I prompt the user to input 2D array contents onto the same line. Ex. 1 2 3 4 5 6 7 NOT 1 2 3 AGAIN this is for input NOT Output. -...
[2 replies] Last: Hi, I believe that you are using a console for input/output So if th... (by shadder)
by elay
undefined reference to a function
 
header file: const sf::Font& GAME_FONT(); source file: sf::Font FONT; const sf::Font& GAME_FONT() { FONT.loadFromFile("arial.ttf"); return FON...
[18 replies] Last: Are you using global objects? (by cire)
by nz881
How to make code syntactically efficient.
 
Hey guys. I was wondering what are some ways programmers, especially beginners, write code that are "syntactically" inefficient. I am doing some research for my...
[7 replies] Last: is there cppcheck for some other languages too? (by shadder)
How to get time in a class
 
Hi, I am trying to print the hour and minute every time an object of a class (Time) is created. I can get the time using the code below in my main function, but...
[5 replies] Last: @kemort, Thanks so much! I don't know where I was going wrong, but it ... (by codebusters)
Recommend [Request]
 
Hello everone, I have learned C++ fundemantals and its rules yet. The problem is that I don't know what I have to do now. I have started to learn Qt these da...
[3 replies] Last: So you mainly write C++ programs for hardware (or IC). Is that right? (by Naughty Albatross)
How to learn any C++ library
 
Hello everone, I am a new C++ programmer and I need how to learn any C++ library for my project/aim. To illustrate, when i come across with a problem and i g...
[1 reply] : There are lots of useful libraries out there. To be able to use them, ... (by Naughty Albatross)
size_t vs int
 
I've come across this multiple times. More than one article has been made on the topic (such as https://ewontfix.com/9/ ). The size_t type isn't defined in st...
[3 replies] Last: This has been a discussion point for ages. More reading for interest: ... (by Duthomhas)
Magic Card Trick Program
 
Could anyone help me figure out why my program doesnt print correctly? SAMPLE: Column 0 Column 1 Column 2 ===========================...
[4 replies] Last: Well that sample is not what I commented on and quite frankly, if that... (by closed account 48T7M4Gy)
pointers
 
need to write 3 functions: 1)main 2)int mod_test(int a, int e, int n) 3)void mod_test(int a, int x, int b, int y, int n, int *out1, int *out2)*out1 here means ...
[1 reply] : Please do not double post. http://www.cplusplus.com/forum/beginner/194... (by AbstractionAnon)
by Ploppz
Debugging a strange FPE (maybe about GLFW)
 
I get a Floating Point Exception when I run my program either normally or in gdb... here's the backtrace: https://bpaste.net/show/5c100c28920f But in valgrin...
[no replies]
Do i need to call destructor when removing a class from vector?
 
I have a class PythonFunction that contains private vector filled with class PythonArgument values there is a destructor in PythonArgument that does clean up m...
[1 reply] : http://www.cplusplus.com/reference/vector/vector/clear/ States: may... (by keskiverto)
mciSendString notify Question
 
Good day, I´m doing a mp3 player, and i need the option of play all the songs of a playlist, but I don´t know how to do it. I have been reading, and it looks...
[1 reply] : The MM_MCINOTIFY message notifies an application that an MCI device h... (by Thomas1965)
Finding an Open Source Game Engine
 
Hi guys, I like programming graphics, however I don't want to reinvent the wheel and create my own entire game engine to accommodate my graphics programming. I...
[3 replies] Last: Cheers guys, I'll have a look (by Irrelevant Elephant)
project euler problem 3
 
alright guys i know this does somewhat defeat the point of project euler but i just do not understand this. i found a bit of code that does give you the right a...
[4 replies] Last: > how does it check if a number is prime > why does it divide factor o... (by ne555)
c++ with gui
 
Hi everyone. I have been given this school assignment to create an ATM with GUI. buttons and textbox. I have written the ATM but got stuck on the GUI. please...
[1 reply] : Maybe transfer over to the Windows programming section but what have y... (by closed account 48T7M4Gy)
unknown error...
 
I don't see any visible error, but when I try to compile it I have 3 hidden errors.... Undefined symbols for architecture x86_64: "_stdscr", referenced fr...
[6 replies] Last: http://stackoverflow.com/questions/13234943/not-able-to-compile-with-c... (by closed account 48T7M4Gy)
Access Member pointed to by a private pointer
 
I'm not sure how to word the question, so I'll update it with any suggestions. I'm creating a Tic Tac Toe program with an attempted OO design incorporating p...
[9 replies] Last: @ a k n You extrapolated what wasn't there. I hope Drue Peters answ... (by Duthomhas)
by AcarX
How can I avoid synchronization when threading?
 
Hello people. I'm writing a multithreaded server application and getting sick of using locks(CRITICAL_SECTION in my case) for data synchronization. I thought o...
[13 replies] Last: http://www.boost.org/doc/libs/1_61_0/doc/html/lockfree.html (by helios)
What do you think about my sort algorithm?
 
I look forward to your feedback! /*==================================================== Projekt : Sort Algorithm Codename : Pharao (of its pyrami...
[18 replies] Last: thank you! A last word about UCP: "The constant discipline of comp... (by closed account 48bpfSEw)
July 2016 Pages: 1... 7891011... 13
  Archived months: [jun2016] [aug2016]

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