Beginners - September 2013 (Page 63)

error:expression must have integral or enum type
 
i get this error here is the code #include <iostream> using namespace::std; int main(){ double c1,c3,c2,c4,c5,c6=0,c7,d; double x=0,y=0...
[2 replies] Last: Operator ^ is Bitwise Exclusive OR (XOR). It works only with integers... (by Chervil)
Friend Function is not printing anything !!
 
Where is the error in the following code ? The program is not printing anything .. #include<iostream> using namespace std; class add { private: int a; i...
[2 replies] Last: This void sum(); is not a function call. It is a function declaratio... (by vlad from moscow)
picture
 
Just wanna ask, can I change the icon of my c++ program? from the default .exe icon?
[3 replies] Last: thanks guys ! (by colognem)
My Advanced c++ instructor is really confusing me.
 
Ok, now I'm taking an advanced c++ course where we are supposed to convert to a standard that c and c# can use as well as c++. Here is the code below. ...
[4 replies] Last: The spec doesn't seem esp. picky to me. Specs. need to be exact, so yo... (by andywestken)
whats wrong?
 
#include <iostream> #include <conio.h> #include <windows.h> using namespace std; int main(){ double x; cout << "how old are you?" << endl; ...
[3 replies] Last: More using tips: #include <iostream> // Do not expose more from a na... (by keskiverto)
why does my code work?
 
Ok, since this code is too long for you to read, I labelled the code. Firstly, i created a pointer called user1 while defining function userpass. The function a...
[7 replies] Last: > My question is, why doesnt the cout statement display the memory add... (by JLBorges)
String assignment statement fails
 
Hello. I'm teaching myself how to program in C++ using a book and online resources such as this site. I've written my first program. It is functional with no...
[3 replies] Last: vlad, thank you for the explanation. I didn't know at first what yo... (by recalibrate)
Vector push_back resulting in doubled int
 
Hi everyone, I am having a problem. I am piping 10 ints into this program(from another program provided to me), and for some reason it is taking the 9th int and...
[3 replies] Last: Thank you cire, I just removed the clearing of the cin and clearing of... (by BRod423)
Getting started in C++
 
Hi I'm new to this forum and the C++ language. So I would like to know the following about getting started:How should I practice coding in C++? Specifically I'm...
[3 replies] Last: Hullo, tainted silver! Nice to have you at cplusplus.com! You can star... (by Superdude)
Function not working?
 
Hello fellow programmers. I'm somewhat new to C++ and I've always found Functions to be confusing, and usually when i try to use them they dont really work, and...
[2 replies] Last: Using classes is probably something you will have to consider. But cl... (by mariostg)
How do you read from file to a 3D array?
 
1) There is a data file containing strings. You must read all the strings into a 3D array. Is this the rright way? So confused. Thank You in advance.
[5 replies] Last: PS Then what are x,y,z? Rows? Columns? For char myArray ; it... (by andywestken)
Needing some advice with my Bubble Sort.
 
So, I say Bubble Sort, but it's actually one piece of an assignment that encompasses the bubble, shell, and quick sorts. But I feel if I get some advice with on...
[4 replies] Last: You could decrease the number of operations if the upper limit of the ... (by vlad from moscow)
by drPek
Pass array of pointers to a function (1,2)
 
OK this 'may' not sound a newbie question but I probably won't understand the answer as i'm new to all this. I've cut bits of of my (monopoly game) program to i...
[22 replies] Last: No, the spacing of the pointer makes no difference! You can even have ... (by LB)
Program Crashing
 
Heres my code. You enter 10 student names, and when you enter done it randomly pairs them and prints our a chart. But after the 10th student and I enter done...
[3 replies] Last: For example if the user entered 10 names then the word "done" or "Done... (by vlad from moscow)
by layzer
need help with project
 
I have to design a rocket that looks like this. /\ / \ / \ +------+ | | | | +------+ | ...
[16 replies] Last: also check out this site which has some great tutorials. learncpp.com ... (by giblit)
C++ Class
 
Can someone out there shed some light with regards to the output of the following code. I have a queue object with two elements a.q =10; a.q =20; but when I pr...
[1 reply] : To get the required order split this statement cout<<"Queue a: "<<a.q... (by vlad from moscow)
Adding the value a pointer points to to an object array
 
Hello everyone I am having a hard time with this. I have been at this since 5:00 this morning. I am working on the command pattern for design patterns class. My...
[2 replies] Last: Thanks for the reply I thought of that but how do I do that for an abs... (by otisphat80)
Using rand() and srand()
 
I'm trying to put random integers into a vector using rand() and supplying srand() with a seed value of 1. I was supplied a list of integers that I should get w...
[1 reply] : Your coding is fine. I believe he same seed can generate different set... (by firedraco)
Comparing two strings program?
 
Hello! Ok so basically I am learning C++ from a self teach book and I have come across a program I am a little confused about in certain areas; my book asked...
[8 replies] Last: Thanks guys! You really helped me out, I understand it now. Just wan... (by SoftMOUNT)
assigning multidimensional array
 
what is wrong here? i am trying to assign hii to second row of array! #include <iostream> using namespace std; int main() { char a ; *(a+1)="hi...
[13 replies] Last: This array is designed to store two character strings. Thing is, go... (by andywestken)
September 2013 Pages: 1... 61626364
  Archived months: [aug2013] [oct2013]

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