Beginners - May 2008 (Page 11)

by Alogo
nested for loop problem
 
I cannot get this program to give me primes. It either gives me all the numbers in a range or just the odds. #include <iostream.h> //for cout and cin #incl...
[2 replies] Last: Also plz use the "Insert Code" button while posting the code. It will... (by DiptenduDas)
Cplus help please
 
I have these 3 problems here out of 20 that I had trouble with.I cant seem to figure it out the output. Thanks guys. /* //problem 1 int number = 99; 2...
[1 reply] : The below link may help u out. http://www.cplusplus.com/doc/tutoria... (by DiptenduDas)
by lucian
Create an array that is a private static data member with a for loop
 
I want to create an array that is a private static data member with a for loop but it does not compile in the header it is declared in the private zone: stat...
[4 replies] Last: U can do the same using a function. Again as u have declared the vari... (by DiptenduDas)
Creating a new thread to execute a sleep function
 
Hello, I need to write a C++ extension that can be called via a lua script. The function I need is a simple sleep functions such as: void sleep( FLOA...
[no replies]
Segmentation Fault
 
I have a Forest array of Tree objects. The array is 21 by 21, but the outside must be predefined with no trees. I am trying to write a member function that wi...
[1 reply] : Nevermind, I found the error. It isn't in that code, but code used l... (by forseti42)
Access Specifiers
 
When declaring access specifiers for members of classes, why would you want them to be anything other than public? The tutorial says that this might give unexpe...
[5 replies] Last: Thanks. I think I'll have to play with it a bit. (by fernobob)
by chris
Pointer question
 
All I basically want to do is have a memory address (for example 0x22FF74), & be able to use that to display the value stored in it. I know how to do like: i...
[5 replies] Last: Thanks for the help - after going through your help I got this code th... (by chris)
Returning array not working...
 
With this code I am working on manipulating numbers in an array and passing them through functions. I am using a bubble sort to pick out the highest and lowe...
[1 reply] : Bubblesort is way overkill to find the highest and/or lowest values in... (by jsmith)
writing a function to return change
 
how do i write a function that accepts one argument as the change. The function should convert the change in numbers of dollar, quarter, dime, nickel and penny....
[4 replies] Last: I see some tricky C/C++ rounding errors coming up :-) (by guestgulkan)
c++ programs
 
What programs do you need to start programming whit c++? i have a old basics book but i don't know what programms i need... =S
[2 replies] Last: There was another thread along these lines recently that you may find ... (by closed account z05DSL3A)
by cppwtf
Comparing 2 arrays
 
I need to compare 2 arrays to see if they have the same values (even if they are in a different order) e.g array1 ={1,6,5,4,3} array2 ={6,5,3,4,1} bo...
[1 reply] : My general advice is to use std::set instead. (Alternatively multiset ... (by ropez)
using namespace std; NOT FOUND
 
Hi, i am using MS VS 2003.NET. When I want to import the namespace std by "using namespace std;" I get the error C2061 "namespace not found". #include ...
[2 replies] Last: Thx for your answer. My file was still saved as a *.C File. When I cha... (by dennisP)
by Rook
Trying to display the contents of an array.
 
How can I display the contents of an array? What I am trying to do is populate an array and then ouptut the contents. I tried this code and it doesn't work....
[2 replies] Last: Thank you very much! That did the trick. I feel a bit foolish, but th... (by Rook)
Final Project Help
 
I'm currently working on my final project for my CSci class. This is my first time programming and I'm still not very good at it. The TAs in lab are useless...
[2 replies] Last: Unfortunately, alot of us are professional developers who don't have t... (by Zaita)
How to diffrentiate private and public?
 
HI there, could any one explain about file and array? not really understand it.. Thx :D
[1 reply] : Can you please elaborate on your question. The topic and what you h... (by Zaita)
Input from a .txt file
 
The assignment is this: I have been given a .txt files which contains 4 lines of data. Each line having 5 numbers. The program should take take each number ...
[5 replies] Last: It does. Thank you for the help. (by agilani)
by chipp
asking for a code
 
#include <iostream> #include <string> #include <cmath> using namespace std; void deg (); void calc (); void sq (); void po (); void ask () { in...
[1 reply] : well, it would be nice if you tell us what you are trying to achieve, ... (by akimatsu123)
help on calculator program
 
i'm trying to make a basic calculator in c++ and i wrote a script but i can't seem to find the problem could someone please help me on this one the full source...
[1 reply] : i started over and rewrote the entire program differently and it works... (by guint76)
Help on making a project!
 
Hi i would like to make a program for my school exams.This will be a Multiple choice questions. I want the program to read the questions from a file (i.e textf...
[6 replies] Last: i think u sud use a function here... with each correct answer call a ... (by milee)
Strings -missing something
 
Hello All, Definite newbie here! I want this code to read a file and take each line that does not begin with "." and put it in another text file. It appears t...
[4 replies] Last: Hi ShantDashjian, Thanks for replying (everyone ;)). I will post my r... (by Fragile Cat)
May 2008 Pages: 1... 9101112
  Archived months: [apr2008] [jun2008]

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