General C++ Programming - November 2017 (Page 10)

c++ directx9 center background
 
Hello, i am trying to code some graphics for a little game in c++ and winapi / directx9. I hav...
[no replies]
implementing push_front() for a custom vector
 
A "Try this" in PPP2 Chapter 20 asks to try implementing a push_front() for the vector class created...
[2 replies] Last: The book showed insert(), so I just used that function in the implemen... (by DragonOsman)
by Exempt
Parsing a array of stucts that contains arrays
 
I've been trying to get this GLSL shader parsing to work for arrays with no luck. My goal would be t...
[1 reply] : I did figure out a solution to this though it's not really inline with... (by Exempt)
General query about Octree Model
 
Hello All, I have gone through some of the online material regarding to Octree model,but still I ...
[no replies]
Word count and strings
 
Assignment: https://imgur.com/a/SU45W Skeleton: https://imgur.com/a/4da0L Its a group project and ...
[5 replies] Last: JLBorges did give quite good hints. If you don't know what, for examp... (by keskiverto)
by Jakjam
Calling Functions Issue
 
I am not sure what to put in the (double, int) part of my functions, because (*newArray, SIZE) doe...
[11 replies] Last: Good. One question though: If you do allocate memory dynamically, who... (by keskiverto)
by helios
Implementation bug?
 
I just noticed this weird behavior from MSVC: std::string s = "-1"; std::stringstream stream(s)...
[5 replies] Last: I ran my test program on Clang 3.8.0 on rextester.com. It set n to 0 A... (by lastchance)
lucky square c++ help??
 
I'm trying to create a lucky square. A lucky sequence means that every number after the first two is...
[1 reply] : Don't double post. Please use your other thread. (by lastchance)
Simple String Class Segmentation Fault
 
I am using c-strings and dynamically allocated memory to create a simple string class. I am almost t...
[1 reply] : Remove CPP file, line 11. (by kbw)
Random numbers in loop
 
I want to get a different array in every cycle of loop but this code is creating the same array ever...
[2 replies] Last: oh I get it. How fool I am... :~ (by Talha Bin Adam)
Dynamic Programming : Tabulation gives time out for some cases but memoization passes successfully.
 
Hi ppl :), I was solving a DP problem and found that on submission, memoization technique passes th...
[no replies]
How to input a sentence (string with many words)
 
I have tried cin.get(t,1999);, I tried std::getline(cin,1999), I cant seem to find any solutions, in...
[3 replies] Last: Almost, you need std::getline( std:: cin, t); (by goldenchicken)
Writing to files. How?
 
I have an array of objects, whose parameters I can transform into one string, I now want to write t...
[2 replies] Last: I will try it now, thank you in advance. Lets see, it........WORKS! (I... (by Demrottens)
Some strange type-problem
 
Hey! I need some help with a strange behaviour on different types. I have a class ("clsMem" - see...
[7 replies] Last: good! That is why I was saying to deal with everything in bytes... y... (by jonnin)
by dap315
Insert function for a Binary Search Tree
 
Hi all, I'm using recursive functions to insert a node into my binary search tree. The program w...
[1 reply] : What do you do on line 4? A compiler does not accept that, because: e... (by keskiverto)
HELP PLEASE :(
 
Okay so i am trying to make an expand function for a vector class that doubles the capacity (cap) an...
[8 replies] Last: Thanks for clearing that up but i still have a destructor (declared e... (by Chervil)
by Johnn
Not too sure how to move on from here. Using linked list to search?
 
Question: Create a Linked list of nodes. Each node should have student names,age,course num,grades a...
[1 reply] : #include <iostream> #include <string> // <cstring> // using namespace... (by JLBorges)
by BJ19
I need help starting my C++ HW assignment.
 
How would I start this program off? Step 1) Declare 2 global constants: NUM_ MONKEYS = ...
[8 replies] Last: @BJ19 For #5 Create a function, like void Least(string monkeys , int ... (by whitenite1)
buggy highest element program - help needed
 
It's intentionally buggy in the book. I need to fix it. But there's also another problem for me. ...
[1 reply] : Okay, never mind about the line number; my own updated code got longer... (by DragonOsman)
Pointers as iterators - Help needed
 
A "Try this" in Chapter 20 has the following specs: Write a function void copy(int* f1, int* e1, in...
[5 replies] Last: Yeah, that seems to have worked. void copy(int *f1, int *e1, int *f2... (by DragonOsman)
November 2017 Pages: 1... 89101112... 16
  Archived months: [oct2017] [dec2017]

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