Beginners - December 2009 (Page 17)

tree problem
 
I have 2 file named first.cpp and first.h and a main. When i compile my main get these errors: first.cpp: In constructor ‘filer::filer(std::string, std::stri...
[6 replies] Last: Thanks, that completely solved my problem. (by akayrak)
Methods returning "incorrect" values
 
So I've just started getting into the C++ world and decided to make a quick Blackjack game, but it doesn't seem to work quite right. I have a CardDeck clas...
[7 replies] Last: I knew it had to be something stupid! Anyways, thanks for your help. ... (by pyrospade)
teacher is looping my while-switch by inputing a char. (1,2)
 
My teacher is looking for ways to mess up our programs and i need some help badly. during my while-switch i have 5 cases and a default and im using numbers for ...
[30 replies] Last: oh man. i just tried it. checking for error isn't enough. the buffer h... (by herbert1910)
Using pointers with array
 
so i have * doubleCapacity(int *list, int size) { code code } how can i return a new array that doubles the size of the parameter list ?...
[7 replies] Last: You should be causing a segfault or bus error. You most likely will i... (by PanGalactic)
How to use class object as private member in another class?
 
hi, could someone explain how to implement constructors, copy constructors, and overloaded assignment operators for a class that has another class object as a p...
[10 replies] Last: Maybe my question is a little off topic, but why the Car class contain... (by Abramus)
Sorting structures
 
Hi, I'm a beginner with C++ and am trying to make a programme that will sort a list of names and mobile numbers, depending on which is chosen to be sorted. I'm ...
[1 reply] : You need to tell std::sort how to compare items. The comparison funct... (by Bazzy)
having trouble with returning true or false
 
This is a cut down version of my code below it keeps on looping through playGame() when y or n is entered I think it is a problem with 'if (playGame)' and 'if...
[3 replies] Last: If the returned value is not further used in the code you also could t... (by MaikCAE)
by robezy
how to get map datastructure elements in the order of insertion
 
Hi, I'm writing a program to find the first no-repeated character in a string. My idea was to scan the string and store the number of occurrence in a map. Thi...
[1 reply] : You can't std::map will always sort your elements. In TR1 there is un... (by Bazzy)
C++ Code of Taylor Series
 
Can anyone in here post a C++ program of the Taylor Series-Solving Ordinary Differential Equations y'=y^2-x^2 where: y'=dy/dx Thanks!!! I'm real...
[no replies]
\ in string
 
I'm having some problems with a string im reading this in from a file and putting it in a string: '\n' now i need to loop through it and remove the single quo...
[5 replies] Last: null terminator...duh. my eyes are blurry from looking at this projec... (by grcunning)
by Lisa
Array with unknown #Loops
 
I am having trouble changing my program if I don't know how many scores I have what do I change the MAXSIZE value to I'm not sure if I should just imput a numbe...
[5 replies] Last: You can create a container, such as a linked list, that can grow dynam... (by PanGalactic)
create vector in class
 
I have one project, and i need help if possible. Here is piece of my code: cout << "This is search \nenter (B) to go back " << endl << endl; getline(c...
[4 replies] Last: Ok i will fix that..can you please tell me how to put "search" part of... (by dzeno10)
How to assign a string to a node
 
Hi guys, I've got a quick question here. I'm creating a linked list in C, and I'm trying to get a string from the user and store it into a node. So I have: ...
[2 replies] Last: Awesome thanks. (by liftingshadows)
by iideai
plz slove this question with array and string
 
I have the exam with this question, but i cant do it. ill have the re-exam on wednesday someone plz help me !!!!!!!!! Write a program that accepts a string...
[9 replies] Last: Wow. Sir I must commend you on your patience to copy and paste so much... (by Umz)
Codeblock setup
 
please i will like someone to help me out on how to download/install the codeblock(codeblock-8.02mingw-setup).Eachtime I try to download it,it downloads for som...
[1 reply] : Try the one that doesn't include MinGW and download and install MinGW ... (by helios)
Reducing file size
 
This might seem as a stupid question but here is my situation: I got my linked list to work and can now add/edit/delete/count and all the basic things needed...
[7 replies] Last: Ok, I tried using SetEndOfFile but nothing much happened. Firstly, I'm... (by unoriginal)
passing a 2d array
 
Trying to pass a 2d array (gameBoard) form main to initialiseBoard but keep getting ' error C2059: syntax error : ']' ' here's a cut down version of my code be...
[3 replies] Last: I can't resist linking this since I just finished it, and it's somewha... (by Disch)
Character in struct
 
Line 15: I need to compare the length of the two new integers formed and specify if the length of the odd digits integer is Longer, Shorter or Equal than that o...
[6 replies] Last: You could, just make a function that takes a Number as a parameter, th... (by firedraco)
transfer from struct array to vector
 
I had this nice array-object named army from a struct named soldier, which included some names with their respective random attributes. I decided that if one o...
[7 replies] Last: Ah, yeah, if you want your iterators/pointers to remain valid, on inse... (by firedraco)
General Questions About Linked Lists in C
 
Hi guys, I've just got a few basic questions here for you. I'm currently working with Linked Lists in C (just starting out) and just came from Java. First...
[5 replies] Last: Thanks firedraco, that helped a lot. I'll post back here if I have fur... (by liftingshadows)
December 2009 Pages: 1... 1516171819... 23
  Archived months: [nov2009] [jan2010]

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