Beginners - November 2009 (Page 6)

How bad is a kludge?
 
This is a STYLE question not a technical question, the code provided is merely to give an idea of what is going on and the level at which I am currently writing...
[10 replies] Last: Technically the : ? operator call the conditional operator. It ... (by closed account z05DSL3A)
File input/output
 
Can someone help me? im trying to make a save file for my app and i need to read a string from 3rd line of the text file. The file contains: 1 0 This is th...
[2 replies] Last: Is using save.ignore(2, '\n'); Ok? It works with it, it firsts... (by award982)
question about linked list
 
i am writing a program.. using the structure and linked list.. but when i pass through the list, i want to "cout" the list, but i dunno how to call the data sin...
[1 reply] : p->mark (by Bazzy)
Question about circular reference
 
As the following four files, the codes will not compile due to header circular reference. Here is my dilemma. A is a parent with multiple kids B, so A cont...
[2 replies] Last: thanks. (by chrisben)
by gfitzp
Sorry for Dumb question but im stumped
 
Hey this is my first post. Im trying to teach myself c++ and have reached the Arrays section in the documentation of this site. However, I cant figure out h...
[2 replies] Last: Thats great mate thanks for that. I suspected something like that but ... (by gfitzp)
C++ program
 
In the text file given in text. Words from a string to the next line do not apply. The words of the lines assigned to at least one space. The spaces may be line...
[1 reply] : What? http://www.cplusplus.com/articles/how_to_ask/ (by Bazzy)
Stuck on Linked List Reverse Function
 
Hi, I am stuck of a void function to reverse a linked list.. I looked around the web, and this function seems to always pop up: void Reverse(struct node* h...
[5 replies] Last: the function reverses the links. variables hold the links we change so... (by herbert1910)
by robezy
What is name mangling/name decoration?
 
thanks
[2 replies] Last: :) :) (by robezy)
How to read/read arrays of structs in binary mode.
 
Hi guys, I'm teaching myself read/write in binary mode and am having some difficulty when reading/writing arrays of structs. After I've written data to a file, ...
[2 replies] Last: Alright, did that and everything is working fine now. :-) I'd post the... (by gnewfenix)
Palindromes
 
I'm writing a simple program that can check for words or phrases and determines if it is a Palindrome or not. A palindrome is a word or phrase that reads the sa...
[2 replies] Last: Thank you joeriMJ, I modified the code again and look like this int... (by linhmulan)
Passing by reference... Stupid Q
 
Sorry for this question but I can't hold back lol here is some code from the tutorial: // passing parameters by reference #include <iostream> using na...
[4 replies] Last: Haha thanks Disch! Great answer :) Nick (by NickPaul)
fstream
 
plz somebody help me to understand fstream
[5 replies] Last: okaz.............. (by Maisam Tamar)
by Jerome
fstream const string 'no matching function'
 
I have been banging my head on this one for a while. Here's the code: #include <iostream> #include <fstream> #include <string> using namespace std; ...
[2 replies] Last: That's right. You need to use .c_str() to get a C-style string. (by Zhuge)
overloading true and false operator
 
I am just wonder what the point is of overloading the false operator as overloading the true operator already does the job. Let's say you have this: // O...
[6 replies] Last: In C# there is also another overload ! operator. That even confuses me... (by kenryuakuma)
Do I need to create a counter for input records?
 
Is there a system counter of the number of valid input records read? I want to be able to output the number of records read without creating a counter, if possi...
[2 replies] Last: I changed the code to fix it: if (!inMyStream.eof()) InputRecord... (by Matunas)
Matrix Multiplication
 
Hey again (C++ Noobie Day 3), I spend most of my early years programming in Java, recently I've been using MATLAB for a lot of uni stuff (Engineering). Anywa...
[7 replies] Last: Well, this was a task for school and it has a few extensions beside th... (by joeriMJ)
graphics in command prompt
 
so my teacher wants ou class to display a poker hand twice and show the hand as actual imgs in command prompt. we cant use SDL of any winAPI programming, just c...
[3 replies] Last: Then ask him how exactly you are expected to draw an image on the text... (by Duthomhas)
arranging vector<object*> in order
 
Hi I have created an taxpayer object which has string name, and a float salary, and i store them as pointers in a vector<taxpayer*>. Can anybody tell me how to ...
[3 replies] Last: That looks like the general idea to me although the class attributes p... (by kempofighter)
Multiple-Up project advice
 
Hello everyone. I've been working as a consultant for a small printing company, and now that the main project is done, they've asked me to help with any number ...
[9 replies] Last: I got it to work. Thanks for all your help! (by Matunas)
by TanKCR
double input validation??
 
Hi I have only been working with c++ for a week now so hopefully I don't sound to ignorant. I have been trying to find a way to only allow an end user to enter ...
[8 replies] Last: Not quite sure what you mean...I would just use an if statement. (by Zhuge)
November 2009 Pages: 1... 45678... 25
  Archived months: [oct2009] [dec2009]

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