If you prompt a user to enter a value say;
"Enter Salary: $"
Then the user enters 500.00 and strikes the enter key.
The cursor then goes to the next line.
And this is what I want to prevent
I...
Type: Posts; User: davewang
If you prompt a user to enter a value say;
"Enter Salary: $"
Then the user enters 500.00 and strikes the enter key.
The cursor then goes to the next line.
And this is what I want to prevent
I...
thanks for the suggestion guys!
just a curious question, random_shuffle() does what? is it efficient to random a array?
#include <iostream>
#include <cstdlib>
#include <ctime>
#define MAX 20
void randomvalues(int *l, int n) {
srand(time(0));
...
Hi guys!
I'm writing a program that involves with random generation. Basically, I want to randomly generate a range of values, lets say from 1 to 10 to an array of 10 element. Another thing is I...
it's hard to explain but I really need that s1 value in the member function print.
s1 is an object that refer to one of my string object in the main function, i just wanna print its value in the...
How can I call an argument of a member function from another member function?
Here is the two prototypes of member function from a class:
int my_string::strcmp(const my_string& s1);
void...
Hi again,
I'm self-learning about class and member function now. One curious question is can i create an object of a class in the member function of another class?
i see, thanks
Hi everybody,
I'm having a really hard time learning about copy constructor. I have tried to read several books about copy constructor but seems like i'm stuck or something.
For example: (the...
thank you! i found it very useful, and one more question, is it possible to prevent the same random number printing out? because if the same random number pop up , i'm sure that some vocabularies...
Hi everyone! i got an idea, but not sure it is possible to make it in C or not. Here the thing:
I want to create a program for testing vocabulary. I think that i can just simply apply the printf...
I got error "coflicting types for 'calcavg', and conflicting types for 'outresults' "
Hi everyone! last night i got a headache just because of this error "Conflicting Types". I try to play around with my code in hope that it gonna fix the problem, but seem useless. Here is my program:...
yo got my mind laserlight! that's something that i'm struggling on! now, things is clear! probably have to consider back to set an appropriate value for the array! thanks guys anyway!
all right guys! thanks for the tips and advice!
hello! i just have a quick question about array. Is there anyway i can set my array declaration [ ] to infinity? because i don't want to set a huge number in the array declaration like [10000000]
all right! thank everybody very much! actually i'm just a beginner for this! reading u guys discussion, i'm really get into it even i dont really understand it. Probably later, i will understand well...
here is my problem! i'm trying to intput a string using fget() method. The problem is it doesn't allow me to do it. Here is what i did:
#include <stdio.h>
int main()
{
int...
wow! thank you for your example MK27. Seriously, i have never learned it in class. The instructor just told us to use scanf and printf to write this program! i never thought that it gonna turn in so...
I tried it, and it let me type in information for the hobbies, but this time it got crash again, and was unable to print out the form
may i ask" what do mean by set aside strorage? " sorry, because i'm just a freshman to the C programming language!
and can you point out what did i code wrong about it? cuz i'm wondering. I have try...
Hi everybody!
I have a project just received by today. It is pretty simple. Basically, just write a program about filling an information form and then print it out. (Using scanf and printf only)...