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

Linker
 
i dont understand how to use the liknker to use Allegro... heres what im trying to do http://www.youtube.com/watch?v=twCcrheACDY&feature=BFa&list=PL8F2C7CBA749D...
[8 replies] Last: yes it look like that but i cant link anything in there. (by Invader2010)
Inheriting and using class data members
 
In the code below, class D1 inherits from class A. A has a virtual function and a data member FileCount. So D1 inherits both. I am keeping the interface i...
[3 replies] Last: @kbw - What if VerifyInventoryData()'s implementation is same for the ... (by n4nature)
Vars over internet
 
I'd like to know if it's possible to use winsock to send vars over the internet in the plain console, if it is, is it much different? How would a server hand...
[3 replies] Last: Back on that topic... So if someone elses needs help, they can find it... (by S G H)
by daljit
for loop go in infinite loop why
 
#include<iostream.h> #include<conio.h> void main() { clrscr(); int i; for(i=0;i<10;i=i++) { cout<<"\t"<<i; getch(); } getch(); } why loop...
[10 replies] Last: #include<iostream.h> #include<conio.h> void main() { clrscr(); int i; ... (by viveksingh95)
rand() for arrays
 
I have to create a game, in which the computer chooses randomly a word out of 5 and randomizes its characters, so that the user has to guess the word. He can al...
[7 replies] Last: % gives you the remainder after division. (19 % 7 == 5, because 19 / ... (by Disch)
Simple array problem
 
Hello guys. I am currently understanding arrays, and then I encountered a problem. Why is it that when I compile & execute this program: #include <cstdlib> ...
[3 replies] Last: I think that's probably a typo. Should be i+1. (by MrHutch)
Good password or not Program
 
A password is good if it has at least one digit,one alphanumeric charecter, one uppercase letter, one ordinary lowercase letter letter and consists of 8 charect...
[12 replies] Last: gcc does reject by default. http://ideone.com/Qo8y1 Your link compi... (by Moschops)
An exception is occuring while popping elements from stack.
 
Hello , I am doing a stack implementation using linked lists. The program is running fine for pushing but while popping elements it is giving it is quitting....
[no replies]
SFML Crash Confusion
 
I've recently started learning SFML. Unfortunately, whenever my "game" ends, the program crashes. I've linked this to my Game deconstructor (and discovered that...
[6 replies] Last: If I had to guess: void Game::Update(void) { HandleEvents(); App.C... (by cire)
Why is this comparison evaluating to true?
 
I'm working with linked lists and I am comparing the contents (chars) of two nodes within my linked list. I took a couple of screen shots that show the value of...
[2 replies] Last: +1 naraku9333 You are comparing pointers (addresses) list1Tracer = 0... (by Disch)
"Has-a" relationship, Composition.
 
I am a little unsure of "has-a" relationship between classes. If I have: class Library { private: int numCards; int numBooks; Book inbooks; ...
[5 replies] Last: Library does have a vector for Books and Cards, just didn't show it he... (by noonmoon)
by arooj
Help with a letter guessing game
 
I have a problem with this code in which an output keeps displaying endlessly and incorrectly. My output should help clarify. I think there is something wrong w...
[1 reply] : @arooj The only problem I spotted was in your if statements. You're u... (by whitenite1)
A Program to compare two contents of files
 
void main() { char paragraph1 ; char paragraph2 ; ifstream infile1; infile1.open("text1.txt"); infile1.getline(paragraph1,1000); ifstream infile2; inf...
[6 replies] Last: For opening desktop files, you have to give its exact path(eg. in case... (by saurav2031)
Tower of Hanoi
 
I'm looking at the code for the Tower of Hanoi. If you're not familiar with the problem, here's a wiki article on it: http://en.wikipedia.org/wiki/Tower_of_H...
[4 replies] Last: 1) u r calling move_rings(3, ...) from main 2) This goes to the else c... (by saurav2031)
Concern
 
I was wondering if i did this right.. heres is the assignment Write a complete C++ program, including at least one good comment, to do the following: your p...
[no replies]
accessing computer files.
 
Ok so early i saw a post about self destructing itself. Which is really just deleting itself. So i was wondering how in my code do i access computer files to do...
[6 replies] Last: I was thinking that, but I somehow couldn't find it so I thought I had... (by Duthomhas)
Memory leak in binary tree insertion
 
Hi, I'm working on a binary search tree template and I am getting some memory leakage from the following function. The function is called on the root of the tre...
[1 reply] : The new node you create doesn't appear to be in the tree. The fact is... (by kbw)
Using a string/enum to access int Matrix[X] ?
 
Hola code gurus, I’m wondering if there’s a way to use a string to access a specific item in a matrix of int . I have a program which uses en...
[5 replies] Last: You need to convert your string to a number. Here are examples of doi... (by Duthomhas)
This code causes my computer to become unresponsive. Only STD librarys are used.
 
int main(){ loadwords(); vector <tuple> key; cout << "input key sets(. to stop)"<<endl; while (1){ int x ; cin>> x >>x ; tuple y; y.x=x ,y.y=x ; if (x...
[2 replies] Last: WOW, thanks. I noticed the input was wrong after awhile, but i never t... (by blueberry)
I'm stuck!
 
This program runs and it takes out the digit that a user types in but I just can't figure out why it prompts this error message. Any advice?
[1 reply] : Please do not post the same question more than once: http://www.cplusp... (by LB)
April 2012 Pages: 1... 444546474849
  Archived months: [mar2012] [may2012]

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