General C++ Programming - October 2012 (Page 2)

Multi-demential array in class
 
Hey everybody, im trying to initialize a multi-demential array in a class constructor - How would i be able to do that ? I tried doing this but it didnt work ...
[9 replies] Last: You don't need to allocate an array to be able ot make 2D that is only... (by closed account o1vk4iN6)
OpenGL SB5 textures
 
In the OpenGL SB 5th edition, I managed to figure out how to make the first 4 chapters work, but when I copy and paste the Pyramid.cpp example program into a pr...
[2 replies] Last: No, I just tried that and I still get the same error. (by ben1996123)
Need to simplify a code block
 
I have following code block for a tic-tac-toe's game. Please help me simplifying it. $ran=0; //For user if(($grid ==$grid )&&$grid !=' '&&$grid ...
[3 replies] Last: I will try it. Actually it is a php's code... (by gaurav gamer)
Understanding Hashing
 
Hey Guys Have an issue with a hashing problem, but there is one major concept that is beating me, how to write the function! I am trying to setup a hash funct...
[2 replies] Last: One possibility is to hash "12001;G" etc as a string. Somewhat more e... (by JLBorges)
path segment
 
Hey, Ive been trying to work on this problem for at least a couple hours but still am not sure how to approach it. I need to write a bool function with string p...
[4 replies] Last: I would also have a function IsDirection to test whether the direction... (by TheIdeasMan)
Program compiles but crashes
 
Im updating a previous lab assignment in which i have to use classes. I pretty much have everything coded and working but when i try to add a task it crashes o...
[15 replies] Last: Here is a better way to quit out of something: bool Quit = false; ... (by TheIdeasMan)
Help with an array size defined by file?
 
I am working on a program that will read in a file. The first integer in the file will tell the user how many numbers will be read in next. The input file m...
[10 replies] Last: That should work. Just remember to free() it when you no longer need i... (by Zhuge)
curl_easy_init() Segmentation fault
 
I have a class Libcurl which has a function Connect defined as : bool Libcurl::Connect(const std::string& host, const std::string& username, const std::...
[2 replies] Last: Great...thanks Moschops.... How could I miss that..:) (by anubhavjain346)
by mac193
Initialized problem
 
This is currently my program. When I try running it, it gives me an error telling me that "The variable 'leftOver' if being used without being initialized". I'm...
[4 replies] Last: Nevermind, I figured it out. Thank you so much for the help on my lef... (by mac193)
by mac193
declaration (prototype) for void function
 
Please help!!!!! The program so far is /* TODO: Write the declaration (prototype) for void function GetLeast that takes an ifstream parameter called infi...
[2 replies] Last: Haha, I suppose I did deserve that. I should have specified, the firs... (by mac193)
I have been stuck on pdcurses for days
 
This may be challenging. I really, really need help on how to use pdcurses. I don't mean help with the code, but help with how to set it up on an IDE. I can ...
[7 replies] Last: A lot of people have the same problem - they assume the default settin... (by LB)
really strange error I haven't seen before
 
Hey guys, So I'm working on making a finite state machine for an AI class at uni, and I have the weirdest of errors right now, been working on it and nothing...
[12 replies] Last: haha, nice analogy, and thanks again :) (by SquishyChs)
System Restrictions
 
So I'm reading "The C++ Programming Language Third Edition", and in one of the exercises it asks what are the restrictions on the pointer types char*, int*, and...
[2 replies] Last: Alright thanks, think I got the general idea. (by Callum5042)
Reading file with multiple different delimiters
 
Hello everyone! I have a slight problem: I have a file called "testfile.txt" and inside is a line: TR01[100,300,1] TR01[130,310,1] TR01[300,300,1] Above ...
[2 replies] Last: Thank you so much cire! Just what i was looking for! You are officiall... (by Tikkunekku)
scrolling/animated menu possible?
 
Currently I am in the process of designing a platformer and was wondering if it is possible to recreate the main menu/title screen of zelda OoT or Aiydn the fir...
[6 replies] Last: Well thank you for your advice =D Once i finish the project i shall ... (by programmeraie125)
Please hepl me by completing vector's find function
 
#include<iostream> #include<vector> using namespace std; vector <string> names; //Getting the values from user for vector void getNames(string tmp) ...
[no replies]
How to convert a char pointer to unsigned short
 
Hello, I am working on this project where I receive a char pointer, but need to cast it to an unsigned short. Below is an example of the code, I am trying to a...
[1 reply] : methodB is saying that it can accept a pointer of any type. This is... (by AbstractionAnon)
by Ammo
Initializing Char Arrays
 
Hi, I wrote a simple program that takes a users information and displays it back to the user. For my char arrays I ran a forloop and initialized them to bla...
[4 replies] Last: Ah -- I'm slipping. I've Edited my post. Wazzak (by closed account zb0S216C)
Reading Data from File
 
Can anyone help me to retrieve data from the file. How do I display the appointment of Peter with fstream void searchRecords() { ifstream someStream(...
[6 replies] Last: thanks for your help .. there wasn't error , but after keying in the n... (by Charcoalman)
Code is Done Can You Just Explain My While loop? :D
 
Hello. I failed my C++ class two semesters ago and I am retaking it. I am doing really well completing all my programming projects on time. I created this pro...
[7 replies] Last: If the next line in the file is not a double or EOF it keeps going. If... (by SamuelAdams)
October 2012 Pages: 1234... 50
  Archived months: [sep2012] [nov2012]

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