Beginners - May 2009 (Page 15)

functions,arrays and everything in between
 
hi there i have this wierd problem usually when i send an array(one dimentioned) when i'm writing a code is like this: x is an array void func(int *x); ...
[4 replies] Last: 2D arrays are 1D arrays -- just with different syntax. Therefore wh... (by Disch)
by kfex
copy constructor
 
I get a wrong value in the object (a) when i write the copy constructor why is this? am i doing something wrong? #include <iostream> class counter...
[3 replies] Last: the copy ctor should take a const reference, not a non-const one. ... (by Disch)
Array in C Programming.
 
Im making a word quiz in C.First a person enter a secret word. printf("Enter the secret words:"); scanf("%s",&secrt_word); then another user will try to ...
[2 replies] Last: i mean there is a match in the alphabet.. like shirt and smile .. ... (by artdeep)
sorting char arrays, assistance please
 
Mk so, I have to do this program for class,input rainfall for 6 months, total them, output total, average, highest month, and lowest month. Here's what I've go...
[5 replies] Last: for (x=1;x<5;x++) ; Dude! You have ';' after your for loops! N... (by kempofighter)
STL Vector question...
 
I'm still relatively a newbie...but I've gained a decent amount of experience using the STL's vector class. Right now, there are only 4 iterator functions (begi...
[9 replies] Last: Ah -- yes. Good point, kempofighter. I so rarely use deque that I fo... (by PanGalactic)
constructor compile problems
 
This constructor in my class implementation file is producing compile errors: PWServer::PWServer (const char* infile, const char* outfile, unsigned int max) ...
[5 replies] Last: Yeah, I was definitely trying to pass a string... Used c_str(). Compi... (by VictorH)
Problems with Vector
 
Hi guys, I defined a vector of a struct "element" as type(that I created) and I had problems on use it. This is my struct: typedef struct element{ i...
[4 replies] Last: it's working now! Thanks for the help. (by BrunoBruck)
by Bv202
Pointers again... what is wrong with this?
 
void RandomArray(vector<int>* getalletjes, int grootte) { for (int i = 0; i < grootte; i++) { *getalletjes = rand() % 101; } } Function call: ...
[7 replies] Last: "Why does it needs (*getalletjes) and so why doesn't my way work?" ... (by apollens)
About handling dynamically variable names...
 
Hi Dear all, I want to create dynamically multidimensional vector. Its dimension depends upon user input. According to user input i created a string which c...
[5 replies] Last: My previous reply is wrong. I didn't quite understand what you wanted ... (by helios)
vector insert
 
I want to insert an object into a std::vector, but do not want to change the capacity of the vector. I believe insert will try to increase the size of the vecto...
[11 replies] Last: Thanks everyone. I appreciate the assist. (by VictorH)
by Joe101
Looping thorugh char array q
 
Can someone explain why the few lines of code below produce the following output output : 1 2 3 //the next 4 lines are what baffle me 70 24 -100 ...
[2 replies] Last: thank you. (by Joe101)
What is wrong here?
 
#include <iostream> using namespace std; int main() { char url; cout<<"Please enter a url: "; cin>> url; cin.ignore(); cout<<"<iframe sr...
[4 replies] Last: it is beta... I had a virus, and when i made a recover disc for factor... (by Easymac79)
by mdgdoc
Issues with prototype
 
I have written some code and I ask for it to be reviewed,(by a person I answer to) They have said that my prototype is incorrectly written. Needs data type for...
[7 replies] Last: "Disch", "Duoas" Please expound on this lesson I need to learn how to ... (by mdgdoc)
char to int conversion
 
char a; //not array int n; cin>>a; //.... When user enter a number in char variabla how can i convert it to number in int variabla. for exampl...
[1 reply] : try n = a-'0'; (by Bazzy)
by mdgdoc
INPUT without OUTPUT TO ALL
 
I need to know if I am doing something wrong on this site. I asked for assitance on more than one project. I have tried to go by the rules set forth, but for so...
[5 replies] Last: I was concerned that no one would send out replies and they did. Than... (by mdgdoc)
c++ file structure
 
Hi, As I start to write more and more complex stuff, I am beginning to wonder a few things. - If I want to put a library full of frequently used functi...
[8 replies] Last: You can have only one call of main() as it is the entry point for your... (by Bazzy)
by mdgdoc
Error assistance
 
I am getting an error message on this and I need some help identifing how to correct it. (32) : error C2065: 'i' : undeclared identifier (33) : error C2065: '...
[5 replies] Last: I would like to say, that the helpful tips that I am getting know are ... (by mdgdoc)
Loops
 
ok I have fixed all my other problems now need Help to get my loop/ if stmt to work right. // InvalidBinDr.cpp #include<iostream> #include<string> #...
[2 replies] Last: Well, read lines 8 and 36-39 of the original code. The assignment is ... (by jsmith)
msoftcon.h
 
I am using Visual Studio and I am wanting to do console graphics on it. The "msoftcon.h" is no longer used. What is used instead of it? Also, if there is a site...
[2 replies] Last: Thanks a lot for your help. (by exercisephiend)
by pajo
Simple string class
 
I am trying to make some simple string class (yust for practice). I have some doubts at begining so i need to see original c++ sting class definition(but dont k...
[10 replies] Last: IMO writing a string or a vector class is better than writing a rectan... (by Bazzy)
May 2009 Pages: 1... 1314151617... 21
  Archived months: [apr2009] [jun2009]

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