Beginners - January 2014

by hbkmad
Can't find the mistake
Hi this is the class I made. #include<iostream> #include<vector> using namespace std; template <class T> class ShortestPathTable { p...
Jan 31, 2014 at 10:39pm
[4 replies] Last: Thank you very much, guys ! (by hbkmad)
Friend Function
I'm supposed to create a function that adds the amount of dollars and cents, so I rewrote the code to include a friend function, and for some reason, I can't ge...
Jan 31, 2014 at 10:23pm
[2 replies] Last: Remove line 17 of your original post to clear up a great many errors: ... (by closed account j3Rz8vqX)
ERROR copying array - pointers
I was trying to copy one array to another one of the same size, but when I execute the program all the array values that are supposed to be copied appeared to b...
Jan 31, 2014 at 10:11pm
[4 replies] Last: LMAOOOOOOOOOOOOO THANK YOU!!!!!!!!!!!!!!!!!!! MY FAULT I DIDNT SEE IT ... (by closed account ivDwAqkS)
by Nata
Passing 2d array to a function help me please :)
Hello would you please be so kind to help me with my code. I should have written a function which outputs 2d array. However, I have a an error in this part : ...
Jan 31, 2014 at 9:37pm
[3 replies] Last: Variable Length Arrays int n; cin >> n; int xs[ n ]; // xs is a va... (by Duthomhas)
SDL_FillRect();
What is the second argument for in SDL_FillRect(); for example SDL_FillRect(screen,NULL, color); SDL_FillRect(screen, &screen->clip_rect, color); ...
Jan 31, 2014 at 8:21pm
[10 replies] Last: No problem. I'm always here if you need questions. (by Avilius)
by wickys
For loops and arrays with sums
Hey guys I'm learning for loop and in my book I have an exercise to display an array of integers. That all works but I also need to print the running total of t...
Jan 31, 2014 at 7:43pm
[3 replies] Last: #include <iostream> #include <string> #include <Windows.h> using ... (by Nata)
by Nata
Error in a code and cant find out why
I should write a function which will count how many words are in a sentence. I thought that this should be right however, there is some error and I do not get w...
Jan 31, 2014 at 7:19pm
[2 replies] Last: okay I already got it if anyone needs help with this kind of thing in ... (by Nata)
by Jarl
Program not working. 3D vectors.
I am trying to create a 3-D cartesian vector class, with a magnitude function, copy constructor, sum operator and accessible x,y,z, coordinates. Strangely it's ...
Jan 31, 2014 at 4:30pm
[4 replies] Last: Or better yet vectr(const vectr& v) : x(v.x), y(v.y), z(v.z) {} :)... (by CodeGazer)
by jidder
Parsing text
How do you parse text efficiently. I looked up how to do it and all of the ways i found seemed quite long winded and specific to certain text Say i wanted...
Jan 31, 2014 at 3:40pm
[11 replies] Last: getline will see that the first character is a '<' this is the charac... (by jidder)
by hakuna
Code not working
so what happens is that 4/3 does not get multiplied to the rest of the equation so all i get is pi*radius*radius*height. please help! float getvolcy...
Jan 31, 2014 at 2:53pm
[4 replies] Last: I can't see any reason why coder777's suggestion wouldn't work? what ... (by mutexe)
ATM machine
Here's one for some of you! I thought I'd try to make a novice ATM machine, the program takes the pin you wish to use and stores that, when you want to change t...
Jan 31, 2014 at 1:34pm
[4 replies] Last: This pointer is destroyed at the end of this function Also you never ... (by jidder)
bubbleSort
Hi , Im basicly new here. I have few problems that I met in c++ programming. The problem is about bubbler sort , it works and all , gives you a correct answer....
Jan 31, 2014 at 1:28pm
[4 replies] Last: An array is an ordered list of things (or elements ). Each element ... (by Duthomhas)
by nvrmnd
what's wrong w/ this extraction of integer
Why won't the former code work ? doesn't work #include <iostream> #include <sstream> int main( int argc, char* args ) { std::istringstream iss( args ...
Jan 31, 2014 at 11:45am
[3 replies] Last: wow, tnx guys, why didn't i think of that (by nvrmnd)
Error:assigning to an array from an initializer list
Please throw some light on following error. unsigned int trans_val_1 ; unsigned int xor_result_arr ; trans_val_1 = {xor_result_arr , xor_result_arr , xor_resu...
Jan 31, 2014 at 11:43am
[12 replies] Last: it's capital 'S' template <std::size_t Size> void sub_trans_out( std... (by nvrmnd)
Problem With Secant Method
Can someone help me find the error of this code? it displays wrong results. Here is a sample output usuing the polynomial x^2-5x+2. Enter the order of the...
Jan 31, 2014 at 11:24am
[2 replies] Last: got it men! THANK YOU SO MUCH! (by newton123)
by ryan01
Trouble overloading >>
I created a simple program that gathers user input and stores it in an array of objects called Games. Then in the end, I go to output the contents of the array....
Jan 31, 2014 at 10:21am
[12 replies] Last: OK. Now see what you can make of this. Code to accept user input and c... (by JLBorges)
Why is conio.h depreciated?
As the title says why it is called depreciated and should be never used ?
Jan 31, 2014 at 10:11am
[2 replies] Last: I'd prefer anytime conio.h functions instead of things like system("pa... (by modoran)
by Wocky
Is a class created in a method remembered?
I'm new to C++, but I've been writing C for several years. I'm trying to learn C++, but on my own (unstructured), and have some questions: Suppose I declar...
Jan 31, 2014 at 9:48am
[3 replies] Last: You have now: void class2::do_interesting_things() { class1* test_... (by keskiverto)
by alsade
question about static member
im trying to compare two strings length and print the longest but because i had to define the string as a static one i cant find a way to do it...help?? #in...
Jan 31, 2014 at 9:37am
[13 replies] Last: I bet confusing terms: Not static , but static as in non-dynamic .... (by keskiverto)
by Vizo
Help ASAP please :-(
Hello everyone, I am trying to solve Prim's Algorithm but I got stuck and confused half way. I don't even know if the result is right or not. please guys I n...
Jan 31, 2014 at 8:38am
[1 reply] : where are you stuck? What is your confusion? elaborate and try to as... (by codewalker)
January 2014 Pages: 123... 44
  Archived months: [dec2013] [feb2014]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.