General C++ Programming - December 2015 (Page 5)

Trying to get draw a triangle
 
I'm trying to draw a triangle using SDL library Basically I have the function to draw a line between two points x,y and x1,y2 , the problem is how do I find al...
[1 reply] : Having the lengths of the sides does not define a unique triangle on ... (by Zhuge)
implements a Binary Search Tree of Products based on their price, where each product
 
Write a C++ code that implements a Binary Search Tree of Products based on their price, where each product object has an ID (int), productName(string), category...
[1 reply] : This is not a homework site. We won't do your homework for you. Howeve... (by AbstractionAnon)
avoiding big numbers and stack overflows during file operations
 
Okay, so, I am writing a program which has to read from sector X to sector Y in a file. The issue is that, what if the value of either X or Y is huge and it cau...
[1 reply] : Just use 64 bit values for x and y: #include <cstdint> uint64_t x, y;... (by dhayden)
Help me fix this program please!
 
It is supposed to output permissions based off of a binary or sinlge digit code they enter. #include <string> #include <iostream> #include <cstdlib> using n...
[2 replies] Last: VERY VERY IMPORTANT!!! : 010 is the number 8! That's because when yo... (by dhayden)
Translation of python to C++
 
Hi guys, I have recently been given a python code and have been tasked to translate it to C++ programming language under Eclipse IDE. However, I am new to C++...
[3 replies] Last: So many, that it would be impractical to list in a forum post. Python... (by MikeyBoy)
by Ozzy69
Compile program in c++ for prompt of windows
 
Hello guys, i want compile my program in c++ for prompt, without use a IDE, but i can only if i put of program in folder of compiler that is minGW. For example:...
[3 replies] Last: You probably need to specify the include path in the options you pass... (by MikeyBoy)
Urgently assist to write a dynamic string array
 
Hi everyone. I have this college project that is giving a headache (i slept early morning at 4 am). I want to make a table with infinite rows and 15 columns....
[3 replies] Last: Thanks comrade Moschops, your answer was real helpful ! Ok, let me go ... (by Mwangi Elijah)
sqlite
 
I use win7 os and code block for c++ program. I want to use a data base (sqlite). Which file should I down load and to set it in C::B id. plz help me.
[1 reply] : See: https://www.sqlite.org/releaselog/3_9_2.html https://www.sqlite.... (by coder777)
Whats the point of #define?
 
I heard of something called Preprocessor Directives or something, and i wrote this #include <iostream> using namespace std; int main() { #define lo...
[3 replies] Last: Thank you (by BobbyT321)
by a10e29
C2280
 
Greetings! this declaration: std::vector<std::unique_ptr<Piece>> formations; Is giving me a C2280 (attempting to reference a deleted function) virtu...
[13 replies] Last: unique_ptr has deleted copy ctor and operator= so copying an object th... (by naraku9333)
Why is my program failing? "add" is not equal to "add"?
 
This is my code. Just note that almost everything written in errormsg() is incorrect. So, this is what I executed: ./exec BATTLETO.NES after.nes 0 55 1 add 0 E...
[2 replies] Last: Oooh, you're awesome! I totally forgot about strcomp... I'm currently ... (by RealGiganitris)
by gabars
Portable background process / service?
 
Hi, I'm looking for a way to have an interactive shell that would switch to background (it's a server) and keep running but free the console. I need it to work ...
[no replies]
by aeck
For the above program, the final value stored in R
 
K = 0 R = 2259 WHILE R > 0 BEGIN K = K +1 R =2258 - K*100 END R = R + 55 For the above program, the final value stored in R is __________ When ...
[1 reply] : Only took 20 seconds to write this program. And I got the answer 13 as... (by TarikNeaj)
Database, binary files or both?
 
I'm preparing to write a program that will be on many different machines and have many concurrent users. These machines are typically connected to a network. ...
[2 replies] Last: jlb, Thanks for the reply. My plan was to create temporary (local onl... (by gijimbo)
Estd Bjarne Stroustrup extensions to std
 
Hi, I am studying The C++ Programming Language, 4th Edition, and it states in pg. 715 that the constraint checks used in that book (and other extensions to s...
[no replies]
Back Propagation Neuron Network Design
 
I am trying to make a digit recognition program. I shall feed a white/black image of a digit and my output layer will fire the corresponding digit (one neuron s...
[2 replies] Last: I converted it to apply the XOR. It's not working but you are right, t... (by kkhalaf)
string conversion
 
Is there a way that I can use a string to create an object. Eg. A user enters a name "Test" and then create an object of a specified type called Test. The o...
[12 replies] Last: That solution seems to be the simplest. However like cire stated you c... (by guatemala007)
Parsing
 
Hello, I practise C parsing, I want to parse a simple FEN string and print it to the console. Here is what I have so far: #include <stdio.h> #include <strin...
[11 replies] Last: > don't still understand line 12. Come on! It's a classical for loop... (by JLBorges)
by keyoh
Problem declaring nested object in another class
 
Hi, I have this GameClass with 3 nested objects, and one object pointer. When I try to compile and access the BoardA object from main, I get an error message sa...
[2 replies] Last: Thank's smac =) Of course.. haha. I put it like that because I need to... (by keyoh)
by GTHell
Can I influence in C++ by myself?
 
Hello, everyone It's just this evening I found out that my school won't focus on advance C++. My instructor told me that he only teaches us the basic of C++...
[1 reply] : > Can I teach myself from a book Yes. Consider: 'Programming: Prin... (by JLBorges)
December 2015 Pages: 1... 34567... 22
  Archived months: [nov2015] [jan2016]

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