447 Posted Topics

Member Avatar for The Dude
Member Avatar for warpstar

How do you know it doesn't return anything? All you know (or at least have shown us), are the prototypes. I assume it assigns a value to the int pointer 'kptr' and because its type is an int star assignment from a function must return an int star. Also, I …

Member Avatar for WaltP
0
121
Member Avatar for still_learning

Well, no. It's not. Do you understand recursion? It's essentially another method of looping but rather than using while() or for(), for example, a function recursively calls itself: [code=cpp]void count_down( int num ) { if ( num>=0 ) { std::cout<< num; cout_down( num-1 ); // Calls the function again but …

Member Avatar for WaltP
0
172
Member Avatar for jobi.tv

search google for code::blocks or devc++ ... are microsoft giving one away still?

Member Avatar for WaltP
0
93
Member Avatar for JesseQ
Re: Help

Not only that but for strings you appear to be using ' rather than ". While neither method will work ... Since you're using C++ you might as well use std::string rather than character arrays. Try an if-else if ladder rather than a switch. [code=cpp]#include <string> //... std::string str; std::cout<< …

Member Avatar for twomers
0
268
Member Avatar for Max_Payne

And what's the error? I'm guessing it's in the number of parameters. Pass in the size of the string (?), N too: cin.getline( N, 12 ); Or whatever size it is. [url]http://www.cplusplus.com/reference/iostream/istream/getline.html[/url]

Member Avatar for Max_Payne
0
145
Member Avatar for The Dude

There must be a reason ... money, I doubt it. As csgal said - just wait a few years. Maybe a bastardised Oedipus complex? Kill grandfather marry grandmother? Maybe the ultimate rebellion from his parents/her kids (but [I]waaaay[/I] too far)? Could it have been unknown?

Member Avatar for twomers
0
113
Member Avatar for The Dude

I just have the one which I got a few months ago. I don't really use it much and I guess it's there just incase I need it ... and cocaine of course. How else can I break it up?

Member Avatar for Lardmeister
0
242
Member Avatar for hbk619

Bet if you copied it into notepad, pasted it and copied it again it'd fix the colours. You just start the guitar? The AIM beep made me jump!

Member Avatar for twomers
0
164
Member Avatar for gator6688

To answer your question: no. >> PeopleTypes[i] != 1,2,3,4 Do you want it to be or, or and? OR: PeopleTypes[i] != 1 || PeopleTypes[i] !=2 || PeopleTypes[i] !=3 || PeopleTypes[i] !=4 AND: PeopleTypes[i] != 1 && PeopleTypes[i] !=2 && PeopleTypes[i] !=3 && PeopleTypes[i] !=4 Aint pretty but you'll get over …

Member Avatar for WaltP
0
103
Member Avatar for DemonSpeeding

>> int image [ROW_SIZE][COL_SIZE]; OK. You want to display the image as characters ... do you need to keep it in memory? If you do you can either change the type of the image to a character array. It'll read in all the numbers as single characters. Then, once it's …

Member Avatar for DemonSpeeding
0
202
Member Avatar for cl3m0ns

Well one option would be to create an integer called 'max_value', or something. Set it equal to the first element of the array. Iterate through the entire array and test each element against the max value. If the element it bigger assign, else leave it.

Member Avatar for cl3m0ns
0
95
Member Avatar for wonderland

Yes. One thing you could do is create a running-sum of numbers and ask the user at the start how many numbers they want to insert, then loop that many times. After it's all looped divide by the number of iterations which were inputted. Alternatively you could read the numbers …

Member Avatar for wonderland
0
181
Member Avatar for Ancient Dragon
Member Avatar for hbk619

I think it's amusing and interesting to read the 'secrets', but one must always remind themselves that they might not be true .... (sorry, just offtopic once more: iamthewee your PM thing is full... apparently)

Member Avatar for hbk619
0
285
Member Avatar for tnvkrishna

The source file itself got deleted? I'm disinclined to believe it could be the compiler ... but what compiler are you using? You certain it's gone? And that it's just not where you thought it should be. Have you searched for it? (as in the OS searches, not you)

Member Avatar for Salem
0
97
Member Avatar for bored2k
Member Avatar for rogenie

>> How else would sum up the total of the number the user entered? [code=cpp] #include <iostream> #include <iterator> #include <numeric> int main() { std::cout << std::accumulate(std::istream_iterator<int>(std::cin), std::istream_iterator<int>(), 0); return 0; }[/code] Only kidding :) Ignore that!! Now. >> for (num=1; maxNum=1; input++) Do you know the proper format for …

Member Avatar for rogenie
0
112
Member Avatar for notathing
Member Avatar for twomers
0
87
Member Avatar for DemonFox

[url]http://www.eternallyconfuzzled.com/tuts/datastructures/jsw_tut_bst1.aspx[/url] is a good reference. It's in C but it describes all the concepts very well.

Member Avatar for eskelsen
0
114
Member Avatar for Ratte
Member Avatar for Mushy-pea

I've heard it's meant to be very like 'eraser', which I didn't like so I haven't gotten it as of yet.

Member Avatar for lasher511
0
53
Member Avatar for Duki

String is part of the standard library so either: using std::string ; or std:: all strings.

Member Avatar for Duki
0
910
Member Avatar for pacman326@gmail

What won't work? People mightn't compile your code so you're going to have to give us some more info. Errors, warnings, crashing?

Member Avatar for pacman326@gmail
0
59
Member Avatar for plusplus

You're going to need: Lemsip, paracetamol, whiskey, cloves, hot water and lemons. Being sick of programming is like being sick regularily, right?

Member Avatar for twomers
0
112
Member Avatar for tech291083

The Google Story is interesting, but that said I only read up to the pictures half way through because I had to read it for 'innovative invention' for a subject in uni.

Member Avatar for twomers
0
52
Member Avatar for Llama

OK. First thing first. You're using C++ so you should think about using std::string rather than statically sized character arrays. Benefits - dynamically resized, memory automatically managed, public methods, easy to use operators (like equality). Downsides - you're going to have to learn them. Especially since you "#include <string>". Also …

Member Avatar for Llama
0
155
Member Avatar for curt22

Do you have a memory stick of some kind? Could you download it in an internet cafe or something and transfer it to your computer at home? Or, as you suggested, a friend? College? Work? School?

Member Avatar for curt22
0
287
Member Avatar for Robin_Dragon

[code=cpp]#include <ctime> #include <iostream> int main( void ) { int i; srand(time(NULL)); i = rand()%200; std::cout <<"Your random number is " <<i <<std::endl; return(0); } [/code] Know how to loop?

Member Avatar for Narue
0
2K
Member Avatar for eddy518

Use code tags. [code] bool determine_square (int& length, int& width) { if (length == width) square = true; else square = false; return square; }[/code] That should simply be: [code]bool determine(int &length, int &width) { return length==width; }[/code] In your function you make a reference to square but the scope …

Member Avatar for twomers
0
303
Member Avatar for restrooms

>> HI CAN U PLS HELP ME IN ADDING SOMETHING TO THIS PROGRAM TO BE LOOK GOOD. Code tags! - [noparse][code][/code][/noparse]

Member Avatar for twomers
0
225
Member Avatar for gaming_geek

Well most of us aren't mind readers here so provide some errors for us to look at. >> #include "C:\Graphics\graphics.h" replace \ with \\ Might/mightn't solve some of your problems.

Member Avatar for Sturm
0
117
Member Avatar for The Dude

[URL="http://www.daniweb.com/forums/%3Ca%20href=%22http://www.nerdtests.com/nt2ref.html%22%3E"]Mega-Dorky Nerd King[/URL] ... damn.

Member Avatar for rghai6
0
117
Member Avatar for twomers

On a freakin' [URL="http://gizmodo.com/gadgets/speed-record/hercules-hits-1307mph-on-a-bicycle-305161.php"]bicycle[/URL]!!

Member Avatar for jasimp
0
132
Member Avatar for The Dude

They should. Nor do they make nice books anymore. I mean antique ... that sounds kinda stupid I know but they look cool. Attached below is a 150 year old version of Dickens' works which I love reading from. It's in tatters, but it's still good. It's also about the …

Member Avatar for Lardmeister
0
90
Member Avatar for christina>you

I find it very confusing. The control pad. There are too many buttons.

Member Avatar for Serunson
0
482
Member Avatar for DemonSpeeding

Did you just add some getlines? It's hard to see what you did differently. Could you maybe highlight it in your code?

Member Avatar for DemonSpeeding
0
102
Member Avatar for hbk619

>> and whats A level math? It's a qualification - [url]http://en.wikipedia.org/wiki/A_level[/url]

Member Avatar for Ezzaral
1
182
Member Avatar for The Dude
Member Avatar for Dha_King
Member Avatar for Ancient Dragon
0
512
Member Avatar for Morla

Do You Always Capitalise The First Letter Of Each Word? :D Welcome!

Member Avatar for Morla
0
44
Member Avatar for cardanadam
Member Avatar for jwenting
-1
70
Member Avatar for donuttier

Don't think of a csv file as anything other than a file. You can access it and everything just like any other file (text file you mentioned). What you want to do is not hard but it requires more than appending data. The simplest way of managing this (I reckon), …

Member Avatar for donuttier
0
2K
Member Avatar for daniweb2013

Shouldn't use void main. getch() isn't a great way of stopping the program. iostream.h is non-standard. use iostream: [code]#include <iostream> using namespace std; int main( void ) { std::cin.ignore(); return 0; }[/code]

Member Avatar for n.aggel
0
2K
Member Avatar for wicked357
Member Avatar for iamthwee
0
124
Member Avatar for abhishekgahoi
Member Avatar for jacques95

The problem is common in mixing cin and getlines. I won't go into the explanation (it's all over the place), but I'll tell you the solution. cin.ignore() before getline(). Also please use code tags when posting code. This is an easy code-sample to read because it's so small. But it …

Member Avatar for JRM
0
96
Member Avatar for wicked357

[quote][code] for ( int j = 0; j < 5; j++ ) { string tmp = crap[j]; //output first and third character cout << tmp.substr ( 0,1 ) << " " << tmp.substr( 2,1 ) <<endl; }[/code][/quote] Wouldn't it make more sense to to: [code=cpp]for ( ... ) { std::cout<< …

Member Avatar for twomers
0
117
Member Avatar for sakthi_2001

Sorry. I thought this was in C++ ... make an array, loop through, and sum: [CODE]int total = 0; int array[ARRAY_SIZE]; /* Fill array with info */ for [0 -> ARRAY_SIZE-1] total = total + array[CURRENT_POSITION] print "Sum: " total[/CODE] Obviously that's psuedo code.

Member Avatar for twomers
0
719
Member Avatar for jilin

So you wrote the code but you don't know how to call a function ... really? That's pretty hard to believe. Just call it like how you'd call any other function and pass the appropriate values into it!

Member Avatar for twomers
0
94

The End.