Beginners - May 2009

I want to make random word, but got stuck
 
so here's the code randomize(); for(i=0;i<100;i++) { for(k=0;k<4;k++) { j = random(26)+65;...
[3 replies] Last: Wohooo I already made it, thanks for the comment... It's solved !!! (by clover88)
by GameOn
to chk if perfect square
 
i need to check if a number is a perfect square or not.its a big number so i take that number in l...
[1 reply] : you can do this by checking if the square root of that number is an in... (by Bazzy)
problem reading binary file
 
I use almost the same code to write to binary file but the problem comes when i try to read the file...
[4 replies] Last: it probably is a knock off it is written by Stephen Prata i was goin... (by Livedereh)
by vmanx
Can't compile this..
 
Hi All, I am trying to compile this program, but am having some difficulty. Can someone please ha...
[3 replies] Last: cin >> numFloors has no semi-colon (by mcleano)
by hubbu
Trying to pass char* array in function, but stuck
 
Hi everyone. I'm trying to, currently, learn how to effectively use .h and .cpp files separately. I'...
[3 replies] Last: If I remember correctly (I'm not in front of my Mac at the moment), in... (by Lodger)
by Null
char to char *
 
How can I convert char to char *? char c='a'; char *d=(char *)c; but it gives me a warning ...
[1 reply] : The right syntax is &c but want do you want to do with that? http... (by Bazzy)
by jimctu
Resizing arrays
 
hi everyone... well i´ve got another little problem here... i have a structure like this: ...
[14 replies] Last: Condescending? condescending 1. Assuming a tone of superiority, o... (by helios)
Sorting algorithm
 
Im doing this program where you enter a movie collection and the it sorts it by the length of the mo...
[3 replies] Last: You must be using a non-std compiler if this code compiles because you... (by kempofighter)
no matching function for call
 
Hey all, I have a problem with my code here, and i don't know how fix this. Here's the code: ...
[3 replies] Last: new Manager(ID, (Name1 + Name2), Numeric1) (by helios)
Hard time with Multiple definitions
 
My first time compiling as a project, and I am getting multiple definitions errors. I get 2 of them ...
[4 replies] Last: I see now. I should put just the generic class definition in the heade... (by budzbox)
dynamic allocation of multidimensional array
 
hi, why do i get the error this code or how do i allocate a multidimensional array with new? in...
[1 reply] : Read this article: http://www.cplusplus.com/forum/articles/7459/ (by Bazzy)
the problem of copy ctor
 
class A { int *p; public: A(int N){ p = new int ;} ~A() {delete p; p = NULL;} }; ...
[3 replies] Last: Are you allocating an array for the new object or did you just copy th... (by helios)
by Nedim
ASCII to hexadecimal
 
I am trying to make application like this: https://www.planet-source-code.com/vb/scripts/ShowCod...
[6 replies] Last: I was just playing with code :D I am still beginner Thank you again... (by Nedim)
generating array elements randomly with specific parameters
 
Greetings all! I know this is the first time I've posted here, however any help on the issue I'm ...
[4 replies] Last: Ah yea that's better, no infinite loop now. my output typically looks ... (by shoot to thrill)
overload <<
 
#ifndef FOO_H #define FOO_H #include <iostream> class Foo { friend std::ostream& operato...
[2 replies] Last: Yes, but there is no point in providing default arguments for operator... (by Duthomhas)
by GameOn
confusion in code
 
i was stuck at 1 problem in which we need to implement bfs on topologiacally sorted graph(input grap...
[5 replies] Last: The URL requires login. i64 d(const vector<string>& v, int n, in... (by helios)
sorting array of strings
 
I am attempting to sort array of string with insertion sort alghoritam but i got run time error, pr...
[1 reply] : actually while(niz >temp && i>=0) { niz[i+1]=niz ; ... (by GameOn)
std::cout with vectors of objects
 
Hey all, #include "Company.h" #include "Casual.h" #include "Manager.h" #include "StaffMember.h"...
[3 replies] Last: That much should segfault as-is. You don't need a pointer to your vect... (by Duthomhas)
Could you tell?
 
What is the format string for a long double?
[1 reply] : http://www.cplusplus.com/reference/clibrary/cstdio/printf/ Eh, OK... (by Duthomhas)
how can I fix this?
 
I wrote a program and when I try to compile it, these errors keep coming out and I don't know what t...
[3 replies] Last: Line 5: {int main (); What is this meant to be? Did you mean int in... (by helios)
May 2009 Pages: 123... 21
  Archived months: [apr2009] [jun2009]

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