Beginners - December 2011 (Page 5)

C++ functions error
 
Hey guys, ive written this program for an assignment of mine, its a airline reservation system that allows a user to book seats within two classes, first and se...
[1 reply] : Well, both functions take arrays of integers and you pass them arrays ... (by hamsterman)
Can you give source code to simple encryption and decryption?
 
hello i know how it works.What i use is virtual key so when someone types "a" it turns into "t" in my txt doc but when i use it,it lookes weird.Can i have some ...
[2 replies] Last: Here you go. Have fun. http://www.schneier.com/book-applied-source.htm... (by Catfish)
loop goes forever at wrong spot (1,2)
 
i'm doing a do-while loop and all the braces match up, but when the user enters logout, it goes to the wrong spot then loops forever.
[27 replies] Last: http://www.cplusplus.com/reference/string/string/ That's one class.... (by ascii)
Yet another compile error
 
I am trying to use this code: #include <iostream> using namespace std; int main() { cout << "How old is the first student?"; cin >> age1; cout << "How o...
[2 replies] Last: -_- Omg I feel like a retard. Thanks for the help. (by Rex McKinnon)
incrementing char pointers
 
hello, I was playing around with char pointers. I wanted to increment each letter of a char array by 1 character. i.e. 'hello' becomes 'ifmmp' (i = h+1)and her...
[5 replies] Last: ohh... ok.. thank you all for ur help.. i think i understand.. (by rushilsharma)
what does Traverse the array mean ?
 
as title says "what does Traverse the array mean" ? can someone please show it with a simple for loop example thx.
[13 replies] Last: so in this code marks is the iterator(finger) and m values are apples... (by ciphermagi)
by fkzira
Data loss during run time.
 
Hi, I was debugging my C++ program, because I find some errors in the result of the same, and discovered that during run time the program delete the content of...
[8 replies] Last: Without a more detailed print out of your code of where you believe t... (by kevinkjt2000)
by Ch1156
Moving letter to next line in real time (1,2)
 
So i have my code, and i was wondering how i would move my letter A down to the next line in real time when i press W. Here is the code: #include<iostream> ...
[20 replies] Last: http://cplusplus.com/articles/4z18T05o/ (by closed account S6k9GNh0)
C question
 
I tried this program but it doesnt work as i thought: /* fprintf example */ #include <stdio.h> int main () { FILE * pFile; int n; char name...
[2 replies] Last: Yes it creates in there, but when i type in whatever i want, the myfil... (by Donanza)
by dancks
problems with memory leak
 
I have no idea what's causing it, because gdb doesn't end where the error occurs it keeps going until it crashes somewhere. Therefore the stacktrace is the same...
[3 replies] Last: Nope, it doesn't make sense. http://cplusplus.com/doc/tutorial/functi... (by ne555)
Question
 
Hi everyone, I am taking a course on database in C++ but I wanted to do some review. Any suggestions on what I should read that can get me started?? Th...
[2 replies] Last: You could read the tutorials on this site: http://cplusplus.com/doc/tu... (by Stupebrett)
Problem with math program
 
So I have this program that allows one to find the square root of a number except it does not do quite that. When I run it, the square root it gets is always 0....
[4 replies] Last: I am not sure that this code is going to calculate the square root: c... (by eypros)
by Hotice
Student sorter
 
I am trying to sort a file containing data from 50 students and I am having loads of trouble. I know my plan, but cannot seem to get it into code for crap. My p...
[7 replies] Last: Can you show me an example of this? I am such a newbie when it comes t... (by Hotice)
Question about stringstream
 
#include <iostream> #include <sstream> using namespace std; bool subsetsum(int *array, int n, int target, stringstream & ss) { // base cases: if...
[8 replies] Last: I asked that because I am not so familiar with stringstream, not relat... (by ccy2059)
by Ernest
Not sure what I am doing wrong.
 
// The function displayMessage is repeadedly called from a loop. #include <iostream> using namespace std; //******************************************...
[6 replies] Last: It was the system("paused") not being system("pause") it compiles fine... (by Ernest)
Variable Conversion
 
Is thier a way to convert a char array into an int and vice versa?
[9 replies] Last: nickoolsayz, "char" is an integral type like short, int, and long - it... (by LB)
by Bluex
Basic Graphics and sound
 
Hey, for a project I will be making an RPG game, and I was wondering what I will have to look at to make some basic graphics and sound. Hopefully you can help p...
[2 replies] Last: Cheers Moschops (by Bluex)
C++ seating arrangements
 
Hi guys, im making an airline reservation system where a user is able to choose a there own seat. But there are two classes, first class and second class. First...
[5 replies] Last: I forgot that you are using a char for the number input. Maybe it is n... (by Mats)
calling functions and other stuff
 
I know you can call functions to bring up new code at a particular point in a program. I was told you can call sound files such as sound.mp3 and also picture f...
[3 replies] Last: The '\a' sound is not "built-in" to the c++ language. The reason it m... (by kevinkjt2000)
Error on compiling
 
I keep getting an error when I use this code: #include <iostream> main() { cout << "Hello World!"; return 0; } and this is the error: Compiling: C...
[2 replies] Last: cout lives in the std namespace. Your options are as follows: us... (by Moschops)
December 2011 Pages: 1... 34567... 47
  Archived months: [nov2011] [jan2012]

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