General C++ Programming - September 2014 (Page 24)

by WAKS
Problems with moving a sprite (SDL)
 
Hello! Recently i have started to use the SDL libery, because of the easy game programming benefits with it. First of all I,m not a very experience programmer, ...
[7 replies] Last: No point creating a surface if all pixels are going to have the same ... (by Disch)
by jami
Massive Assistance...
 
all, hello, i'm very new to the forum and c++ and i'm in need of massive help. i've procrastinated and don't even know where to start. i've got to write a progr...
[1 reply] : Here is somewhere to start: #include <iostream> int main() { std:... (by LB)
by azad90
Sum up price element in node of linked list
 
Hi guys, I'm trying to calculate the total price of books contained in a linked list. I've tried getTotal() function in linked list but error: no match fo...
[2 replies] Last: Book newBook; double total = 0; total += newBook.getPrice(); I've c... (by azad90)
Vectors?
 
Hi, I am trying to pop the element on a vector off and return its value at the same time vector.push_back(); Unfortunatly that code only removes that elem...
[1 reply] : Yeah you will have to copy (or move) the last element in the vector be... (by Peter87)
inet_ntop equivalent in Windows
 
I've been looking over the msdn website for information on InetNtop but it's not working on a Windows 8 machine with Winsock2 enabled, libraries that are requir...
[8 replies] Last: > though inet_pton was not defined Oh, come on now! http://sources.f... (by JLBorges)
Is Data Loader a Good Choice for MySQL Import CSV?
 
Hi everybody! I’m thinking about using Data Loader to migrate data between MySQL and CSV/text files after reading about it online. But, I’ve no idea about t...
[1 reply] : Not quite a C++ matter, ... I expect it'll depend on the backend and s... (by kbw)
by vlkon
If condition - Date older than...
 
Hello, recently I wanted to add some warning message when imputing date (DD.MM.YY) is older than some pre-set value. day DD month MM year YY ...
[3 replies] Last: Thanks, the tuple solution works great. Disch: Actually I like th... (by vlkon)
Classes
 
I started learning and practicing classes. Sorry for the long program. It works fine, it shows some instances of the class object and also let's you add a new...
[3 replies] Last: In C++, class is used to implement a number of different concepts. ... (by kbw)
How to connect database(Oracle)?
 
How to connect database(Oracle)? i'am using code::block IDE
[no replies]
My asterisk diamond...
 
I have been tasked with making a diamond out of asterisks based on a given odd integer input. For some reason the bottom half of my diamond will not print. I'm ...
[2 replies] Last: Ok, I fixed the previous problem, but now my bottom half is coming out... (by Ryan5920)
centimeters to feet and inch conversion
 
#include <cstdio> #include <iostream> #include <iomanip> using namespace std; int main () { double cen, inch, feet; float cen1, feet1; feet1=cen1/2...
[1 reply] : Just use std::cout. This: feet1=cen1/2.54/12; only makes sense in ... (by helios)
by abc1
reference variables
 
here in the following code reference variable is declared. int x=1; int &y=x; since reference variable y is alias to x,why it is not int &y=...
[1 reply] : Why does C use {} for structure and for offsets and not the other wa... (by helios)
Functions and Arrays as Parameters
 
Can anyone tell me what "int values" is supposed to mean as parameters to these functions? I'm not sure what do with them. Also i have no idea how to input val...
[2 replies] Last: So then int values means 3? I put three because that's how many elemen... (by Ayalaj01)
Help Please..i need help :(
 
/*******************************************************/ /* Solify's -> CA Base D3D Menu Selection /* WE11ington -> Disponibilizou Para Combat Arms Brasil /...
[1 reply] : Please use [co de] tags. I think you are missing part of a function.... (by Zhuge)
Loading file crashing game?
 
I've been making a multilayer game for a while and have a config that the game loads for the IP and stuff. I just recently put all the loading stuff into a func...
[3 replies] Last: Nothing wrong with the code? I don't really remember how I made it. Li... (by Bingocat4)
by LB
[Reopened] Why does this error even exist? (1,2)
 
http://coliru.stacked-crooked.com/a/0ef44f6f3df409be struct Base { virtual ~Base() = default; virtual Base *f() const = 0; }; struct A : virtu...
[23 replies] Last: Upon more investigation of the original example in the first post, I'm... (by LB)
what can c++ do in general?
 
Hi! so i'm 12 and i'm very interested in programming and computers in general (just installed my first hard drive and graphics card) and c++ seems to be the mos...
[11 replies] Last: Thank you all everyone you have been a great help (by padawan1545)
by LB
Template overloading?
 
Is there any way to make this work? http://coliru.stacked-crooked.com/a/bc2dd06341f61428[code firstline=2]template<typename, template<typename...> class, typen...
[2 replies] Last: Thanks, I forgot I could do that! (by LB)
Linked list not increasing in size
 
I'm trying to implement a linked list using my own node class. I've created functions to add to the head and tail, return the size of the linked list as well as...
[2 replies] Last: @Disch Ah, you are definitely right. I was convinced that there was a ... (by MrPigeon)
Isn't a class unable to reference itself without hitting a snag?
 
I've done my best to be clear in the title, but I'm fully aware I've done a bad job. So here some more description of the problem. I'm developing a class that ...
[3 replies] Last: Thank you all for your answers. The solution provided by Peter87 did w... (by mihares)
September 2014 Pages: 1... 2223242526... 28
  Archived months: [aug2014] [oct2014]

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