General C++ Programming - April 2012 (Page 45)

How to delete this from memory?
 
I have the following pointers declared dynamically within a function that uses recursion (it calls itself): List *tempList1 = new List; List *tempList...
[2 replies] Last: when you are calling the function recursively then you are, each time,... (by Pravesh Koirala)
Help with AVL Tree
 
Hi, I am getting errors for my AVL Tree and I can not figure out how to fix them. I believe it is the struct that has the problems, but I am stumped. Any help i...
[no replies]
Dark GDK help
 
I am making a snake game and this is what i have so far. The problem is the turning. I am currently trying to make it so that the next tail goes to the place of...
[no replies]
Auto ptr initialization
 
Is a null check needed for the pointer aPtrDevFile (like we usually do after every new function call), after initializing an auto pointer as below: <code> s...
[5 replies] Last: If for some reason you want to handle the case that there is not enoug... (by Athar)
Heap error
 
In below code, FileType is a Base class with function VerifyData() as defined. Derived classes then inherit this function and in the main program, instantiate a...
[2 replies] Last: Well, I had already looked into the stacks, with no avail. The bug is ... (by n4nature)
Help with case [switch statement] code
 
Having an issue with this code Once the program runs: It's not allowing for the 2nd input line to take place It's not calculating the basePrice of the given ...
[no replies]
thread-safe sleep using select
 
I need to do the following for a C++ assessment I'm taking. I've never used the select function before and can't find much on it. The question is: Write a...
[1 reply] : You probably need to provide a valid fd. You have stdin, stdout, stde... (by kbw)
by PT4TB
How does the Sleep delay function avoid CPU usage while waiting?
 
Hello! I notice that when I use Sleep(ms) from the <windows> library to delay a program, the fan does not start up on my computer, indicating that the cpu is wo...
[2 replies] Last: iirc, to "sleep" is actually an OS-specific mechanism which uses the C... (by closed account S6k9GNh0)
Allowing user to choose between to different files
 
I'm trying to make part of a program so that it allows the user to choose between to files. This is what I initially had: cout << "Which data file woul...
[4 replies] Last: Sorry about that. It worked. Thanks. (by fufugrayson)
how to allow uppercase characters to be accepted in my password
 
hello, ,my name is coulton, i am trying to allow either uppercase or lowercase inputs into my code. i can type a password and it will work but it wont let me ty...
[2 replies] Last: thanks alot i took sometime to think about and realized that it was a ... (by coulton gurney)
by tnngo
Help with using Class Object
 
I have an assignment where I have to use a String Class and implement that into another .cpp file. Everything compiled ok with the implementation file. However,...
[no replies]
help with palindrome program
 
I posted yesterday my program for the palindrome and it consisted of the last parts because I was only checking whether a sentence is a palindrome or not.Howeve...
[4 replies] Last: please help me. (by gethelpcpp123)
root file directory.
 
how do i make my c++ program find the root of a file "username.txt" for example
[1 reply] : check out boost::filesystem. I believe the syntax is something like t... (by Stewbond)
Prevent cursor from going to next row
 
I'm trying to draw character based progress bar however, when it is the same width as the console and prints the last character it automaticaly moves to next ro...
[3 replies] Last: That misses the point. If you write the last character on the last lin... (by Duthomhas)
Breadth first search using Linkedlist
 
Hello , i am bit confused about uses of BFS through linked list !!! I was trying to learn BFS of graph using linked list and white grey black node method . Ca...
[no replies]
Resultant Forces program stuck on adding components
 
#include<iostream> #include<fstream> #include<iomanip> #include<cmath> using namespace std; const double pi = 3.14159; //*****************************...
[2 replies] Last: I figured that out earlier, and it's all coming together! Thanks! (by fufugrayson)
by tate1
Program Writing
 
Write a program that uses a function to calculate the sum of all numbers from 1 to n then prints the result to the screen. The name of the function should be: ...
[9 replies] Last: Although true, I still wonder if the purpose of the exercise wasn't to... (by Albatross)
File Size Too Large (>4GB) Problem
 
using : MinGW 4.4.0, Windows Vista 32 bit std::fstream ifs; ifs.open("hugeFile",std::fstream::in | std::fstream::binary); std::string line; while(getli...
[5 replies] Last: You're welcome. This is why we call it an object oriented language. E... (by TheDestroyer)
by vsk23
Map of Vectors of strings
 
Hi, I am new to this forum and to c++. I am writing a program that will create a map of vectors with each key of the map referencing a vector of strings. ...
[9 replies] Last: why are you not using to get the string.rigth() to get the right side ... (by bluecoder)
smooth transition between tiles?
 
so yesterday i played around with the code for my game engine, and im quite happy with the result. i made the movement of the character tile based instead of pi...
[5 replies] Last: nevermind i got it to work (the code i used is very ugly, but it works... (by even821)
April 2012 Pages: 1... 4344454647... 49
  Archived months: [mar2012] [may2012]

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