Beginners - February 2013 (Page 10)

by T4l0n
why this doesn't work with char ?
 
i made a simple calculator using floats and string: #include <iostream> #include <string> using namespace std; float add(float num1, float num2){ ...
[1 reply] : You'd also need to change the if statements to check for a char litera... (by Lynx876)
Function isn't calling?
 
Why in the world is the function not calling? #include <iostream> #include <string> using namespace std; void readStudent( ); struct Student { str...
[4 replies] Last: lol good stuff (by tj3434)
I have no idea what to do
 
Can someone explain what my prof wants? I am really bad at pointers and have no idea how to use them. Here is my constructor for SeatSelection class we used...
[1 reply] : http://www.cplusplus.com/doc/tutorial/pointers/ (by SamuelAdams)
Bubble sort
 
//Bubble sort(COMPILED N EXECUTED ON BORLAND C++) #include <iostream.h> #include <conio.h> void main() { int a ; char v; do{ cout<<"ENTER 5 VALUES:"<<...
[6 replies] Last: Yes, noobletplusplus is correct. (by Chervil)
Pointer with a struct
 
So, I need to reference the struct of student info, but Im not allowed to use any parameters on the readStudent function. Any suggestions? #include <iostr...
[4 replies] Last: studenta has different scope and not on main() 's variable scope... (by chipp)
Program delays before displaying (SDL)
 
I don't know whats going on here but the delay seems to happen before the display even though it comes after. I do see it flash up after the delay. void Pla...
[2 replies] Last: Ahh.. makes perfect sence lol, thanks (by jadegnan)
Fatorial from 1 to 20
 
#include<iostream.h> #include<conio.h> void main() { int a,b,c; for(a=1;a<=10;a++) { b=1; for(c=1;c<=a;c++) b=b*c; cout<<"Factorial of "<<a<<" ...
[10 replies] Last: Ah I see that now. OP's post wasn't clear. I thought he was explaini... (by ResidentBiscuit)
Help with 2D Array
 
I am trying to do some math to values inside a 2D array. What I ultimately want to do is take the average of a "block" of the array, calculate average, and out...
[2 replies] Last: The post/pre increment/decrement (++x,--y,etc) also modify x and y, yo... (by noobletplusplus)
C++11 initializer lists ugly?
 
const CodeType dms = std::numeric_limits<CodeType>::max(); versus const CodeType dms {std::numeric_limits<CodeType>::max()}; Which one would you use in y...
[3 replies] Last: Uniform initialization? Like: It makes the 'most vexing parse' proble... (by JLBorges)
why does this transpire
 
I'm confused, someone explain? the errors are odd #include <iostream> int main() { std::string str = "hi"; for(int i = str.begin(); i != str....
[4 replies] Last: There is no need to use a subscript with a pointer because that pointe... (by closed account 3qX21hU5)
Pointers and Vectors
 
Hi, i have to solve the following exercise. Write a constructor for the class testArray which uses the "new" operator to assign anaraay of 10 integers to the i...
[3 replies] Last: in the testArray::testArray(int arg) constructor you are declaring a... (by noobletplusplus)
Get name and number in one line
 
Hey there, I'm writing a program that takes 5 players names and scores and sorts them and outputs the top 3. I just started writing this and already I'm stuck...
[4 replies] Last: Yeah, sorry about the input. I just used hardcoded data as an example.... (by Lynx876)
by Kai82
Urgent Help, pls......code block hello world.
 
I have a problem on my code block when making the hello world! Although i try search in internet but i cant find the solution. Tis is mine code for it: #...
[4 replies] Last: I'm afraid that's a little out of my area of knowledge. Try asking at ... (by ausairman)
Polar coordinates of a point
 
Hi, I want to create a program in C++ that can find polar coordinates of a point, can somebody help me or give useful links? I need to use classes, right?
[2 replies] Last: Google "Rectangular to Polar" I need to use classes, right? The task... (by Chervil)
assignment help!!!!!
 
1)use for loop statement to display
[6 replies] Last: Here is the idiom for doing something 10 times: const int SIZE = 10... (by TheIdeasMan)
conformation!!!
 
is this acorrect way to show the display of(using for loops) a aa aaa aaaa #include<iostream> using namespace std; void main() { int j; {for(j...
[2 replies] Last: What you did would work fine, but below code would be more clean and f... (by a k n)
Checking the occurrence of characters from binary file
 
The main program asks for user input of what ascii decimal value they wish to know the occurrence of in the file. The problem I'm having is that it seems to ig...
[1 reply] : You don't show the code where (a) the file is opened and (b) you find ... (by Chervil)
printf("%what",..) for user defined types
 
typedef struct Node { int data; struct Node *next; }node; node* var; ..... printf("%x",var->next); what should be %x here (for type 'node')?? ...
[no replies]
Made it about 1/3 through my book... Help
 
Hello, I joined this forum not too long ago, after deciding that I wanted to learn C++. After doing some research, I decided to buy Jumping into C++ by Alex ...
[no replies]
Linkable classes
 
So, I'm reviewing a program on pages 193-195 of C++ for dummies, 6th edition. [o // LinkedListData - store data in a linked list of objects #include <cstdio> ...
[3 replies] Last: THANK you! Makes a lot more sense now! ^^ (by Shinji2013)
February 2013 Pages: 1... 89101112... 67
  Archived months: [jan2013] [mar2013]

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