Beginners - May 2012 (Page 57)

protected class
 
Class C is derived from class B publicly and Class B is derived from class A publicly; can a protected member of class A be accessed directly in class C?
[2 replies] Last: No, it's not. I am learning about C++ and it's new to me so I tend to ... (by jag4205)
Float confusion
 
Are the following statements valid? Why? float f = 10.0; const float *pf = &f; f++; (*pf)++;
[6 replies] Last: Try reading Introduction to programming with C++ (by jag4205)
Const question
 
Are the following statements valid? Why? const int m =200; const int * q = &m; ++(*q); ...
[5 replies] Last: actually 'constant' is a key word which tells the compiler that the va... (by Pter0dactyl)
by EeAA
error: Error redefinition; different basic types
 
I got this error: Error1 error C2371: 'ItemType' : redefinition; different basic types Can someone help me to fix it, please? Thank you! in main I have...
[7 replies] Last: oh yes!!! thank you. I totally missed it. (by EeAA)
How to convert a vector<char> to a const char array?
 
Hello I'm having troubles doing conversions of vectors and chars :(. Heres my vector: vector<char> file_data; Heres my const char : const char file_...
[2 replies] Last: I ment an actual conversion :) of a vector char to a const char Here... (by Noobscratcher)
by TL29
Began learning strings: Need to split one string into multiple
 
I am writing my first program using strings. In the program, I need to read in the date in a specific format and then do a whole bunch of stuff with that inform...
[5 replies] Last: It could be easier to parse it using the I/O streams: #include <st... (by Cubbi)
Char declaration
 
Is the following declaration valid? Why? char str = "COP 2931";
[3 replies] Last: Okay, thanks :) (by jag4205)
Char question
 
Is the following statements correct? Why? char s = "Greetings"; s = “Greetings";
[6 replies] Last: Thanks :) (by jag4205)
by julng
Counting words
 
Hi, I have questions regarding to this topic to count the words from the input file. for example, if the words inside the file "Give me everything" It will be ...
[8 replies] Last: Well, this: void countWord (list <char> &myList) { list<char>::i... (by coder777)
some questions
 
hi, here are my questions: 1- what does cout<<setprecision(integer) do exactly 2- what are static variables 3- what are parameters & arguments 4- what are ...
[3 replies] Last: As for point 6 according to the C++ Standard "A parameter name shall n... (by vlad from moscow)
expected un qualified-id
 
Hello I am very new to both these forums and programming so go easy on me. I would like some help with the following program I am trying to write. It isn't a ...
[2 replies] Last: From what you wrote only the initilal part of the code could be correc... (by vlad from moscow)
what is wrong in this code
 
#include<iostream.h> #include<string> #include <cstdlib> struct node//node type { int c_code;//current acount number node *r; node *l...
[2 replies] Last: for (i=0;i<=11;i++) { cout<<pre <<"\t"; } This loop will access pre ... (by Peter87)
by julng
using strcmp for sorting
 
Hi guys, I have difficulties on using strcmp. So the task is to sort the list numerically and alphabetically. I used strtok to divide into tokens. I am getti...
[2 replies] Last: [quote=hamsterman]If some s1 and s2 were integers, you'd check that s1... (by Peter87)
How to setup PDcurses on 64bit Win7?
 
Hello guys. I want to start using PDCurses. I downloaded it, and set it up, following instructions on this video: http://www.youtube.com/watch?v=mYnfix8ruAo ...
[2 replies] Last: Add directory pointing to "ncurses.h" to codeblocks search directories... (by modoran)
by wadaah
Why cannot read 2 file in the same time?
 
I want to read the position of a word from file1 with position of an occurrence from file2. and put both data in linked list. But I cannot read multiple file in...
[no replies]
Handling fractions
 
I'm trying to do a matrices program that will allow me to solve a matrix with 3x3 dimensions the answers being in a fourth line of the first dimension (technica...
[6 replies] Last: Yeah. I finally made it. I only have to change a few things to make ... (by GRex2595)
help with making array into a bubble sort
 
So I have an array that displays ids, scores, and corresponding grades based off the class average. It inputs the ids and scores from a external file. My goal n...
[1 reply] : Hope this helps http://www.cplusplus.com/forum/beginner/69717/ (by TheDestroyer)
Could some please look at my code? Constructor help:
 
Hello, I am writing a beam analysis program, and I need to use a constructor method defining the + sign as increasing the length L of the beam by the amount ...
[8 replies] Last: [quote=Jikax] "always thought the destructor just needed to be there. ... (by closed account zb0S216C)
Break statement failure
 
My code works except for the break statement, and I can't figure out why. Basically, I need to find the first instance in the fibonacci sequence that the terms ...
[7 replies] Last: I figured it out. I was using the abs() function which only works with... (by NerdTastic)
by nsx
ok, im new to c++ and im writing a program that is a quiz
 
this is the program so far: #include <iostream.h> #include <iomanip.h> main() { char a,b,c,d,character_entered; int i,g; float f; ...
[7 replies] Last: Everyone thank you so much! it works! but sadly i forgot to use a loop... (by nsx)
May 2012 Pages: 1... 5556575859
  Archived months: [apr2012] [jun2012]

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