Beginners - April 2012 (Page 41)

Random number generator function issue?
 
This is the program I have for a random number generator. somehow, it does not work and the console output screen hangs. Anything missing here? #include ...
[2 replies] Last: thanks it worked :) (by cpplover)
Saving in a program?
 
Im a beginner programmer and I have written a really simple program as practice. In the program it asks if you want to create a new account. If you say yes then...
[4 replies] Last: Thanks for the info guys! Im gonna get on that today! (by JarydC33)
a question regarding using for looop to read data
 
it's me programmer-x, new to Cplusplus.com and also new to c++..... how i can read data containing numbers and characters from a file using for loop structu...
[3 replies] Last: well thats good but dont introdice yourself or say: Its me, (your nam... (by shaggy)
by takzee
cout space in string .
 
Hello , This is my code #include <iostream> #include <string> #include <cctype> using namespace std; int main() { string word , word2; int ...
[3 replies] Last: else if (isspace (word.at(n))) word2.append(" "); I added this ... (by takzee)
Universal OS screen clear?
 
Is there a universal OS screen clear function? To my understanding system("cls") is for windows, system("ls") can be used for Linux (please correct me if wr...
[8 replies] Last: Thank you Duoas! (by gmenfan83)
Vectors problem.
 
Hi, I am going through the new stroustrup book , Programming: Principles and Practice using c++. I use Visual C++ 2008 express. It is a program where you e...
[4 replies] Last: The problem is that after cin >> s; the new line character stays in t... (by darkcow)
by Whaler
Could someone explain fstream to me?
 
I struggle with fstream in general, but at the time being I don't understand how to use a reference parameter to write to a file from a void function. Say I wa...
[1 reply] : Make sure you have ofstream as a reference in the prototypes as you do... (by vin)
Help
 
ok so I am being asked to "Write a class called decimalHexOctalBinary that has four properties mainly decimalUnsignedInt (base 10), hexadecimalUnsignedInt ( b...
[no replies]
by Yume
Matrix of chars
 
I have a problem who reads a matrix with nxm elements of strings and have to display the string which has the biggest length from each line. Here's my code: ...
[4 replies] Last: Thank you guys! I found the mistake now! (by Yume)
by manp
converting frm string to char and using pointer
 
Hi, I am writing a code that in the middle I have a problem in converting a string to char. I need to get a character from a string and use that specific chara...
[no replies]
Need help on operator += .
 
Problem Fixed.
[2 replies] Last: It's ok I fixed it. It only took one line of code. (by Subzero030201)
Help with logic, array, chars
 
I am trying to create two functions, E_function and D_function. The two functions will be compared to an array of alphabet letters. I want to take input from a ...
[3 replies] Last: Well, first things first: fin.ignore(100,'\n'); fin.get(ch); while ... (by cire)
by arooj
Writing sequential access files using fixed point notation
 
I was wondering how to write a sequential access text file using fixed point notation to 2 decimal places. What I tried in my code did not work, when I inputte...
[no replies]
Runtime-accessable databases
 
Hello, all. Second topic on cplusplus.com. Woot! I would like to know what types of databases one can have in C++, but I have some specifications. I know of ...
[no replies]
how to wrap text into a 2D array
 
Hello, I'm having a couple problems working with 2d arrays. My array is of size 5 rows and 5 columns. I want to gather a word from a file put it into an arr...
[1 reply] : hi HPexpress [quote=HPexpress] fin.get(ch); while (ch != '\n') { fi... (by altbdoor)
Help with pointers to classes and Dynamic Memory
 
I am trying to make a short program that tells you how much money you have when you enter a number of pennies, nickels, dimes, and so on. I defined a class for ...
[2 replies] Last: Wow, thanks. I didn't know you couldn't pass parameters to a construct... (by Halfbreed)
too few arguments to function `void loa::drawMap(int)'
 
void drawMap(int a) { What's wrong? I get the error too few arguments to function `void loa::drawMap(int)'
[1 reply] : The problem is when you call at that function. The message should have... (by ne555)
Understanding [un]desirable functioning of my program.
 
I have been working on a small home project just to increase my skill as a c++ programmer. This project is a small inventory simulator program. I finished the b...
[10 replies] Last: It would like silly if you were asked to enter a number and you entere... (by LB)
Visual Studio crashing help!!!!!!!!
 
#include <stdio.h> #include <stdlib.h> typedef struct { int x,y; }T_position; void set_position(T_position *pos, int row, int col); // acquir...
[2 replies] Last: Thanks! (by providence)
reverse
 
I keep getting no output for my string reverse #include <iostream> #include <cstring> using namespace std; //Function Prototype void printReverse(char...
[2 replies] Last: I kept trying it, but then when i reread it I noticed the hello backwa... (by kdmpenguin)
April 2012 Pages: 1... 3940414243... 66
  Archived months: [mar2012] [may2012]

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