Beginners - December 2012 (Page 58)

Using ifstream with functions
 
Hi everyone, I can't seem to figure this out. I'm trying to get data from a file (lines 46-48) and then use that data in some functions. This is working ou...
[7 replies] Last: it certainly should: http://ideone.com/wdLcIZ (by Cubbi)
by squiq
passing a 2 dimensional char array through a function
 
Hey guys, I tried to get the following code to work for all day long, but I still don't get it. I searched a lot in other topics, but withouth succes. I al...
[7 replies] Last: thanks a lot guys! I finally got it working and learned a lot. Here'... (by squiq)
2d vector use
 
so i'm suppose to create a program that inputs a cross word with its words to find and the program finds the words for you..so far i only the code for reading i...
[1 reply] : so it's possible to read and use line number to make a comment please ... (by Darkmaster)
Overloading "<" operator
 
Hey guys I have this class of books that has two strings and I want to overload the "<" so that it checks firstly the book names and then the book authors St...
[4 replies] Last: im looking for same for same autho and then if they mismatch ie not eu... (by penny9key)
Help with Matrix Multiplication
 
#include <iostream> #include <math.h> using namespace std; class Row { double *arrArray; int nLength; public: Row() { } Row(int...
[3 replies] Last: guess you are using global variables then. that also works (by Darkmaster)
Create Array of Variable Length, Depending on Contents of File
 
I have a file that is formatted in a certain way. Here is an example: "input.txt": 6 3 A B C D E F G H I J K L M N O P Q R The first two numbers at the top ...
[2 replies] Last: you can't define an array with a certain size during runtime. just use... (by Darkmaster)
How do I get terminal cursor position?
 
How do I get the position of the cursor in Terminal and save it to variables called X and Y (X being the row, Y being the column), preferably using NCurses. I...
[no replies]
Strings to an array
 
Hello, I have to read in a .txt file with 5 lines of text and I cannot find an tutorial with the necessary functionality I'm looking for. I am aware I hav...
[1 reply] : here is the tutorial http://www.cplusplus.com/doc/tutorial/files/ (by Darkmaster)
Help with reading from file into struct
 
For now all I'm trying to do is read from the file into a array of structs but it's not working. I have it open 4 times because I thought that would help. Witho...
[2 replies] Last: what coder777 said and i think you want to remove the ";" in the first... (by Darkmaster)
time(NULL) crash
 
Hi, I have 3 'c' files. "A.c" is main file, "B.c" is menu and "C.c" is clock file. In my case I want to show the time in main file and after I call to "C.c" ...
[1 reply] : It's almost impossible to fix specific problems like this without view... (by Hippogriff)
repeated letters
 
ok so i have a program which is supposed to generate a random char array, then count the array, then display the count for each letter. the function display cou...
[2 replies] Last: You might be a genius. Or you just know what you're doing. (Unlike me.... (by jlmckelvey91)
ATM machine
 
Hi .. can someone tell me about the error here :( #include <iostream.h> void main () { float balance=0,value1,value2,account; int telephone,...
[4 replies] Last: http://img04.arabsh.com/uploads/image/2012/12/03/0d32454c66fb06.png (by albnfsjia)
Need some assistance
 
I am a first year C++ student who doesn't really understand the class and I need some help with a Fox and Hounds Program for my class. Codes in Question L...
[4 replies] Last: That fixed most of the errors and I'm going to work on the others. Th... (by Teslacap)
[Beginner] A problem outputting array elements
 
Hello there, So I've been into learning C++ for a long time, and I finally started. So I was working on this Tic Tac Toe CLI game, and I faced a problem. Here ...
[3 replies] Last: @SamuelAdams: lol yeah! Actually, thats not what i meant. I am trying... (by CPlahPlahLearner)
Program just exits after first user input
 
Here's what I have to do: a) Prompt the user to enter numerical grades of students in a test, one at a time, and store it in an array. This is accomplished in...
[4 replies] Last: Ok I fixed it. Sorry. Not sure if you can tell, but I have no idea how... (by mwingard)
by Halp
Converting Letters into a Phone Number
 
Hi there! This is the prompt for my homework question: To make telephone numbers easier to remember, some companies use letters to show their telephone numbe...
[1 reply] : All you'd need to do is add a char variable outside a while loop that ... (by mukomo)
C++ Random Number
 
I was wondering if there was a way to create a random number between a certain range in C++. I need to use this for a game I am building. Any help is apprecia...
[3 replies] Last: http://www.cplusplus.com/reference/cstdlib/rand/ This points you to t... (by mukomo)
Help me learn by putting this in one line.
 
This is the original code which works fine: int* p_base = (int*)0x01E11C60; p_next = (int*)(*p_base + 0x5b8); *p_next = 999; Would someone help me learn t...
[2 replies] Last: So simply explained. Sometimes I guess new guys like myself need to q... (by Playerpawn)
STL Minimum Priority Queue Question
 
I am trying to create a MINIMUM priority queue by using C++ STL's. What I want is it to be ordered from smallest to largest (min pq), using an int. What I also ...
[no replies]
Inventory System, getting a few errors
 
Hi, I'm rather new to programming and I'm working on an inventory management system for the class I'm in. Here are the directions for the assignment: Your c...
[2 replies] Last: Thanks, I made a few changes so now it will compile, but the program i... (by lauraw487)
December 2012 Pages: 1... 5657585960... 65
  Archived months: [nov2012] [jan2013]

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