Beginners - March 2010 (Page 19)

random numbers??
 
hello guys, for example i have three numbers which are (2,4,6), and I want to print these numbers randomly please reply in code waiting for you
[5 replies] Last: Not sure what you want to do... is it that instead of finding a random... (by liero)
by liero
Adding values to vector<int> , and printing values from a vector
 
I am attempting to find and print the odd integers, from a vector that holds integers. I've looked at the reference on this site (http://www.cplusplus.com/re...
[3 replies] Last: I had another problem, resulting in this error: expected unqualifi... (by liero)
Class array with variable number of elements
 
I'm creating a class which represents a polygon, and I want it to be able to set the number of sides when constructed so I wrote this code: class Polygon {...
[3 replies] Last: Will the array be deleted automatically when the destructor is run? ... (by Disch)
Input/Output file
 
I am trying to write a program that shows an output.dat file showing the following format: John J. Schmidt --------------- First name: John (4) Middle na...
[2 replies] Last: I created an EOF loop. Thanks! (by MicMagicFly)
future C++
 
is the language of C++ still developing? or is it pretty much fixed and there are likely to be no changes in the future
[3 replies] Last: If you read the FAQ, then you will find the answer to that question. (by firedraco)
cin.get() ?
 
OK this idea came from General from his/her post I want to catch the "idea" ! so I started to work on it and got stuck but I don't know why my code does work h...
[6 replies] Last: What Bazzy is trying to say your inputting char and then comparing the... (by Bozica)
Problem with an array
 
Dear guys, How can i solve this problem? You can see the problem in last lines, how can i show the names (for example) which are in a line where day=2? Becou...
[1 reply] : I'm trying, but nothing.. :| (by mszigeti)
Whats the best (String vs. Cstring)
 
Hello all! I am fairly new at C++ but i am currently learning about string / c-string processing. My question is what is more efficient, strings or c-string (ot...
[2 replies] Last: The Microsoft CString was written before the STL (and thus before s... (by Duthomhas)
by w0ot
lower/uppercase and char check
 
hi, would someone be able to help show me the code for a program that prompts me to enter a character. Then the program determines if my input is an uppercase l...
[5 replies] Last: [quote=sammy34]Perhaps a little hint to get you started. Characters (c... (by Dragoon478)
Trying to Create While Loop?
 
I am trying to compute amount of change in quarters, nickels,dimes,etc. I have done the program and it runs fine--when no while loop is placed. Everytime I try ...
[2 replies] Last: I don't understand where you want to put the while loop. I'm not sure ... (by sammy34)
by LEESI
String calculaton as a Function
 
#include <iostream> #include <string.h> using namespace std; int main() { char anywordstring ; int size; cout<<"Please enter anyword\n"; cin.ge...
[14 replies] Last: aahhh ok, i think i was over complicating it for myself,i kind of star... (by LEESI)
I want to catch the "idea" !
 
Hello I have this problem: -------------------------------------------------------------------------------- 4. Write a program that reads in integers of 4 di...
[3 replies] Last: @General: Three hints: number % 10 gives you the ones digit of a... (by jsmith)
a file problem
 
the code is : //First,"wt"open the file "TEST" //then change to "wb" open the file "TEST" #include <stdio.h> void main() { FILE *fp=fopen("TEST",...);...
[2 replies] Last: that's FILE *fp=fopen("TEST","wt"); FILE *fp=fopen("TEST","wb");... (by mhjerry)
trouble with looping
 
currently, i had write a program for testing my skill purpose.. but i got hang over this two part. # include <stdio.h> # include <stdlib.h> int main () ...
[3 replies] Last: this is my new code... /*this program created by: Group Name : ... (by kenhapi)
binary results are reversed
 
hi, i am trying to perform a binary conversion when i am stuck at a point where from Decimal i convert it to Binary the results will be in reversed. Is there a ...
[9 replies] Last: There's a much better way to get 2 n than using pow(). Namely, what j... (by helios)
by w0ot
While and do-while loop
 
Hi, could someone show me the codes uses a while loop and do-while loop to obtain and display the sum of odd integer in the range of 11 to 121. thanks much.
[2 replies] Last: thanks whoami32 (by w0ot)
by quuxis
How are int, float, double, etc. store as Bytes?
 
I understand how a char is a byte, that ranges from 0 to 255 unsigned. I know an int is 4 bytes, but how does the system really store an int? Does it store it ...
[6 replies] Last: Thanks maikel, the wikipedia link helped! Btw, I am already a colle... (by quuxis)
creating function.
 
how would i make a function which does something like 1. it takes in a value or it can not like test() works but also test(12) works. 2. if it receives a valu...
[2 replies] Last: I found a way to solve my problem without using function. thank you f... (by whoami32)
Grade Increase Question. Enum?
 
Hi there! I'm trying to learn C++ on my own and am using the book C++ Primer Plus. So far I've learnt about data types, compound types, pointers (intro) and th...
[3 replies] Last: Thank you sammy and maikel! The solution works perfectly... Its a b... (by Unicyclist)
Vectors in functions
 
When ever I try to pass two different vectors into a function. For example together(set1,set2) set1 has 10 elements stored, and set2 has 20 elements stor...
[1 reply] : You'll need to post your code. (by kbw)
March 2010 Pages: 1... 1718192021... 34
  Archived months: [feb2010] [apr2010]

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