General C++ Programming - October 2013

pointer trouble!
 
Hey Y'all, I'm having trouble with this homework problem. I got the first part down which is why you see all those p=j and p=1 pointers. But i am stuck on the s...
[6 replies] Last: Thanks You guys! Really appreciate it!! (by Totes my goat)
by Disch
C++ Unit Testing Frameworks
 
Anyone know of any good ones? I've used NUnit for C# and python's unittest module. I assume there must be something similar for C++. Anyone have recommen...
[2 replies] Last: From my experience (which may be subjective), boost.test, google test,... (by Cubbi)
html parser
 
Hi everyone, I'm making a program to download the html of a website. There is information within the html that I want to extract. I can use libcurl to dow...
[2 replies] Last: Hi, Unfortunately the website has no API. I'm using libxml2 but I'm ... (by rozick1)
Anything wrong with this c++ code?
 
I don't know what i'm doing wrong. I did everything perfectly and it's showing massive amounts of syntax errors according to my professor. I have checked over a...
[8 replies] Last: I wholly agree with you there LB. I've never actually took a college c... (by closed account N36fSL3A)
by gemic
Boost serialization
 
Need some help with my program. Im trying to create a ReadFile function that will read all the information in the archive and print it to the screen. But so fa...
[3 replies] Last: Yes it's exactly something like that I'm looking for, but not getting ... (by gemic)
by tegi00
Help with Linked List template testing
 
We're supposed to test a linked list class template that is provided for us but I'm having trouble figuring out how to test a couple of the functions. Here ...
[1 reply] : You need to test for two conditions with first(): when the list is emp... (by Albatross)
seekg and tellg with random file i/o
 
I know the following: 1) seekg method actually moves the file pointer. The g stands for “get” so it moves the get pointer. It takes two arguments. The f...
[2 replies] Last: tellg() get the position of the get pointer and tellp() gets the posi... (by Cubbi)
by AMG
Insane problem regarding variables in an if statement
 
Hello, im new here and i am having a problem thats driving me absolutely insane. Long story short, im programming a simple game engine and i am writing a functi...
[3 replies] Last: Thanks to the both of you. The mistake was so simple yet when looking ... (by AMG)
Odd numbers help
 
i want know the 5 distinct odd numbers from 1 to 20 the sum of these 5 numbers must be Equal to 50 Is it possible
[1 reply] : No it is not possible. odd+odd = even odd+even = odd therefore: odd... (by Disch)
Redirecting child process I/O to std::stream
 
I found out how to do it with Boost, which I'm pretty sure is the closest to a standard-C++ solution you can trivially get. Create a boost::iostream::file_de...
[no replies]
Logical Error somewhere?
 
During the initial period, when the heater is not yet functioning at peak efficiency the heating will increase the temperature inside the building at a rate giv...
[2 replies] Last: intervals looks wrong. Maybe it is. I have no way of knowing wheth... (by doug4)
ambiguous call on overloaded variadic template operators
 
Hello! When compiling the code #include "tensor.h" int main() { Tensor<2,-2> m = {{1,2},{1,3}}; Tensor<2> v = {1,5}; std::cout<<m*v<...
[3 replies] Last: Thanks! Now it's clear how the variadic templates works, the strip fun... (by Viktor Jonsson)
A really simple (for you people) question about "setw" statement.
 
How many spaces does "setw" statement leave? (more like "How this statement works?") I coded like setw(4) and it left only 1 space. In a new program I coded t...
[6 replies] Last: Good luck! (by ShodanHo)
by Tomhet
Y real 90 degree
 
ey I made a camera with OpenGL The camera works with adding XYZ directory I need [-90,90] degrees from Y rotate but it use [-45,45] degrees... I know why but...
[7 replies] Last: I think I finally see. Let me rephrase: You have two positions: Cent... (by keskiverto)
by cody
static_cast
 
Im trying to swap the values of an integer and a character, however Im not sure where to insert the static_cast<type> part that I need for this to happen, can I...
[5 replies] Last: How about the following: // Program to demonstrate a function templa... (by abhishekm71)
What's wrong with what I am doing?
 
doing this program for class. it came up with the error message:error LNK2019: unresolved external symbol "void __cdecl torque(double,double,double)" (?torque@@...
[2 replies] Last: D'oh! Thanks JLBorges! (by Yifan Shen)
Serialize Deserialize
 
Hallo All, I'm trying to serialize and deserialize graphic objects, but it doesen't work. What exactly is wrong? Here you can find the code (.cpp and .h): ...
[2 replies] Last: Thanks, that brought me a step further! (by mitgliedsname)
Hangman game with word bank input from .txt file
 
I am trying to pull my words randonly from a wordbank .txt file and so far i have this #include <iostream> #include <cctype> #include <fstream> using ...
[1 reply] : i was also given the parameters of using an array to switch lowercase ... (by BigThirzty)
by cody
Runtime stack overflow
 
Hi can anyone tell me why my code is getting a stack overflow? also any other tips would be nice, im trying to make a program to go with the logistic function f...
[12 replies] Last: Your code int logistic(int generations, double rate, int initial_pop)... (by Lachlan Easton)
Pointer trouble !
 
I am having some trouble with this pointer problem ! I cannot figure out how we find the input. I don't have trouble with basic pointers, but this question is b...
[2 replies] Last: Iteration 1: I = 0, j = 0, k = 0. Hence output - 0. (2nd cout) Iterat... (by abhishekm71)
October 2013 Pages: 123... 46
  Archived months: [sep2013] [nov2013]

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