Beginners - October 2013 (Page 8)

error expected class-name before '(' token
 
Write your question here. Updated Code #include <iostream> using namespace std; class number { int a,b; public: number(); ~number(); int s...
[7 replies] Last: @NT3 and others Thank You Very Much !!!.... The Program Worked As Expe... (by Sainatarajan)
declaring a variable
 
When declaring a variable, are they stored next to each other? So for example would this show values of b and d? #include <iostream> using namespace...
[1 reply] : No, AFAIK, only array elements can be assumed to be stored sequentiall... (by abhishekm71)
Install gdb-7.2 on Solaris 11 for segmentation fault error.
 
I am trying to install gdb-7.2 on Solaris 11 for debugging a c++ script that is issuing a segmentation fault alert. Once configured (./configure), checking w...
[no replies]
I don't understand the purpose of this
 
I was studying someones code and something didn't make sense to me. I don't understand the point of having clock() - GameAvailTMR, I thought about it for awhile...
[4 replies] Last: For some reason I seemed to think GameAvailTMR = clock() meant GameAva... (by Dominic4774)
Using for
 
I'm a beginner. I don't quite understand about loop especially about statement for. And how do we using for to get the output e.g : 1+2+3+4+5=15 I wish your he...
[1 reply] : When you know the number of iterations to solve the problem, you shoul... (by eyenrique)
by Ltp
Assignment prolem. Need Special help :(
 
Hi there, I want to use these data instead of the variable 'n' in my linked list. i.e., every node should contain these data: string name; string id; int ...
[5 replies] Last: Oh i just found the error. Thanks very much man.. :) (by Ltp)
2nd C++ assignment. Hopelessly stuck
 
So this is my second C++ assignment. I have spent 37 hours now watching youtube tutorials, rereading the book, typing and throwing out code. I need to get this ...
[2 replies] Last: Thanks a bunch! (by cjbUSMC)
by chafah
Implementation of Dijkstral's Algorithm .
 
I'm new in c++ language. I'm taking C++ for c programers in Coursera. I have been given a homework to implement dijkstral's algorithm. I don't know how to go...
[no replies]
by wolfv
compile error: no matching function for call to 'transform(
 
The first example has no class definitions, it compiles. The second example has the same code in class definitions, it does not compile. Why does it not compi...
[4 replies] Last: Why does this->char2int not work? Because, as Albatross already exp... (by Catfish4)
Dynamic Arrays
 
For this program assignment I am supposed to create dynamic arrays with initial size of two, and ask the user for input to fill the array. Once the array is fil...
[5 replies] Last: deleting the old array should come in the function that grows the arra... (by nvrmnd)
rate calculator function.
 
I have to make a function that will calculate the interest using this formula current * (rate + 1)^ time.. however i cant get it to calculate correctly anybody ...
[1 reply] : I figured it out #include <iostream> #include <cmath> using namespac... (by redbull805)
by giblit
Log function
 
Is this the best way for making a log function? a^x = y A = (x-1)/(x+1) ln(x) = ( 1/n(A^n ) //where n starts at 1 and increases by 2 each time log(x) = ...
[2 replies] Last: Alright thanks I'll have to give that a try I forgot about that shortc... (by giblit)
by Ltp
Linked_list_std_info problem
 
I have this piece code. #include <iostream> #include<string> using namespace std; class std_info{ public: string name; string id; int credit; ...
[2 replies] Last: Its much straight forward bro. Can you explain it? (by Ltp)
Fraction class
 
I have homework that I've been procrastinating. Here's the problem: "Create a class for working with fractions. Only 3 private data members are needed: the i...
[8 replies] Last: Ok thanks again for all your help! I really appreciate it (by gibnihtmus)
by stacyd
C++ Random number guessing game
 
I have to write a program that will run a random guessing game. The game is to be numbers from 1-100, the guesser gets 20 tries and at the end is supposed to be...
[9 replies] Last: @giblit Thanks for clearing the semi-colon thing for me. Regarding the... (by Annatar)
Vowels counting not working anymore
 
This code was working for me 30 minutes ago, but all of a sudden it started to return 0's and 1's. It's supposed to count how many vowels does the string I inpu...
[2 replies] Last: That fixed it, thanks for the help! (by joey0xx)
by Dick
Array help
 
When I run this it displays some weird characters that shouldn't be there right after displaying the name. What am I doing wrong? //prototype delaration...
[1 reply] : You aren't null-terminating your string, so you're running right off t... (by booradley60)
Character functions
 
This is currently an unfinished version of a code i'm working on right now. I am wondering why my code shows me digits after i run my code. How do i make it so ...
[3 replies] Last: It's all about how the << operator interprets types. When it sees t... (by booradley60)
by BC300
Control Structure Errors
 
I have to create a program where you have 4 choices and it gives you different messages. I can't compile the program due to the error messages. I can't figure o...
[6 replies] Last: I couldn't see that from my monitor. I was able to fix my code and eve... (by BC300)
by binso
strcopy problems
 
hi. I am writing a program to copy a string without using the strcopy funcion. I am copying from a to b, but I am not able to delete from b to be ready for an...
[4 replies] Last: This maybe what you are thinking about. #include <iostream> using n... (by mobotus)
October 2013 Pages: 1... 678910... 86
  Archived months: [sep2013] [nov2013]

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