Beginners - April 2010 (Page 27)

Function prototype and defining functions
 
I'm trying to write a function prototype, and define and call the function. The function is called distance and should return a float and accept two float para...
[14 replies] Last: Thanks! (by shepp2670)
by jat707
uninitialized array?
 
this prog keeps saying grades needs to be initialized, but it shouldnt....help! #include <iostream> using namespace std; float findAverage (int , i...
[3 replies] Last: there's more. the initialization of your grades in main needs to be mo... (by m4ster r0shi)
Problem with count()
 
Having finished my first C++ book, I recently picked up TC++PL. (While much of it's gonna go over my head, I've already learned a lot I didn't know about the la...
[5 replies] Last: Thanks! (by closed account jwC5fSEw)
by dasman
Saving a project...
 
Making it portable. I have a project with lots of dependencies, with libs in various folders on my drive. How do i save it so that the dependencies and the head...
[2 replies] Last: I think OP wants to make the project portable, not the generated execu... (by helios)
Vector class in c
 
Can the vector class be used in C? I use it all the time in C++ but I'm getting errors (like vector not declared) when I use it in C. I'm wondering if I need ...
[3 replies] Last: There do exist ways to write such things in C, though. Limited v... (by Duthomhas)
by Leydin
Unable to find smallest number in an array
 
I am working on the second part of the Pancake Glutton exercise here: http://www.cplusplus.com/forum/articles/12974/ and for some reason I am unable to obtain t...
[7 replies] Last: @kenpo - Thanks for the info. I wasn't trying to reinvent the wheel pe... (by Leydin)
Tic-Tac-Toe Program using 2D array
 
(Or Naughts and Crosses if you prefer.) Hello. I'm having a problem with a 2D array program. I'm pretty sure I'm close, but Visual C++ 2008 says no cigar. ev...
[4 replies] Last: Consider using constants instead of hard coding the 3 in multiple plac... (by kempofighter)
Data file with string and data values
 
Hi everyone, I'll start by saying that I'm pretty horrible at programming, so please bear with me. OK, I am writing a program that will open a data file, sear...
[no replies]
programming a Quadratic Equation Solver (1,2)
 
Hi, I'm having issues figuring out a few issues with my program. It seems to somewhat work correctly minus the few details i was given to enact. One issue ...
[20 replies] Last: As advice, you can streamline the calculation of det to sqrt(b*b-4*a... (by tummychow)
beginner problem - number guessing.
 
Hi all, Am attempting the exercise where the computer has to guess a users number in 7 turns or less - am in need of a hint. Here is the code so far - I ha...
[9 replies] Last: I then used the tried and tested taunt of 'Is that the best you can d... (by m4ster r0shi)
How to write the code for these programs ...?
 
Hello everybody .. My teacher asked me to write the following programs: 1) Write a c program that, using nested loops, displays the following pattern shown...
[5 replies] Last: Program1 #include<stdio.h> int main (void) { int i,j,x; // ... (by anasXanas)
guessing game
 
I'm trying to write a program for a guessing game where the user enters a number and tries to guess what number I have chosen. After the guess is entered the pr...
[5 replies] Last: Sorry. (by maikel)
const issues
 
Could someone assist me in modifying the below code to make the 2D array get set. It keeps telling me I need to use a const: h = atoi(rows.c_str()); //put in...
[2 replies] Last: Also for a more biased/dissuading article: http://www.cplusplus.com/... (by Disch)
need some code examples of linked list
 
Hello guys I m very weak at the programing specially at linked lists so please tell me any site or forum so that i could find any examples from it.waiting for y...
[4 replies] Last: use std::list. http://cplusplus.com/reference/stl/list/ You said i... (by kempofighter)
by LiLi
binary to integer
 
Hi, I have a quick question which may be very basic, but I'm new in C++ and appreciate a lot if any one helps me with this: suppose I have a string of bin...
[4 replies] Last: Try memcpy or, if you're using std::string you can use the string cons... (by hamsterman)
by Groo
Illegal indirection erors
 
Hi guys n gals, I'm getting Illegal Indirection errors on lines 15 and 16 and I'm not sure why. I think it has something to do with pointers. Obviously I...
[2 replies] Last: Excellent! Thank you for the input. It really helped. (by Groo)
trouble with cleaning up this program?
 
Im am working on a program for class and I am a beginner C++ programmer. i am almost finished but keep getting errors about illegal use of local functions? I a...
[3 replies] Last: to be honest im not sure? Ive have been fallowing my book and it has m... (by jojomanjman)
by anzki4
Expected primary-expression before "else"
 
Expected primary-expression before "else" That is the error I get in both "else" and "else if". What is wrong in this code.( I searched all around and tried "...
[17 replies] Last: Well thank you for all your help. I think I`ll just use comments like ... (by anzki4)
by kcbob
capital letters in program
 
this is what i have if (command == 'x' || 'X') //statement else if(command == 'y' || 'Y') //statement if the user inputs a x or y lower or capitol i...
[6 replies] Last: oh thanks sometimes those things slip and it takes me a while to find... (by kcbob)
weird results
 
It's me agian, with another noob problem..=( but I just can't seem to figure it out. This time I am writing code for a program that is suppose to have 2 functi...
[5 replies] Last: thx for all of the replys, but for "magnificence's" reply, if you ... (by paulliwali)
April 2010 Pages: 1... 2526272829... 35
  Archived months: [mar2010] [may2010]

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