Beginners - August 2010 (Page 5)

Seriously stupid question
 
No, seriously, it's probably the stupidest question in a good while. I'm not a C/++ programmer; I can read enough syntax to get by but for the most part I just...
[1 reply] : Yes, that there is non-standard syntax. (It shouldn't compile.) It ... (by Duthomhas)
by sequba
Counting divisors
 
I need a very fast way of counting the divisors of very large number. I've written something like that, but it's to slow for me: unsigned long int numb...
[9 replies] Last: You're right, but this is enough for me at the moment. Maybe I'll try ... (by sequba)
linked list and fonction in a structure
 
Hello, I begin and I've a little problem : I've made a code to create a linked list included a name and a number for each case, and then some sorting and del...
[5 replies] Last: Sorry, I'm stupid. I've understood that my problem was impossible. It'... (by problems99)
First time using structs (1,2)
 
This is the code vul_struct.cpp #include <iostream> #include <cstdlib> #include <vector> #include <string> using namespace std; void vul_struc...
[32 replies] Last: There is obviously some confusion here between declaring and defining ... (by Galik)
converting a string to a int value
 
How do i convert a string of words into a int value? What is the code for it?
[9 replies] Last: this is an example of the source code and the parameters of the functi... (by Mihay07)
by gpfs7
cant figure out how to open a file called musicfile
 
in void initialize i am trying open a datafile to read from and a printerfile for out, i cant figure out what to put in there //Retrieving information from...
[1 reply] : Your main() function has no type and no opening brace: int main() ... (by Galik)
2d array error
 
Hi I am trying to get user input for a tic-tac-toe game and am currently in the stage of checking if the inputted value and if it is an invalid number, it keeps...
[2 replies] Last: LB sorry this was a problem i mistakenly wrote , i have edited it ... (by Chazzmundo)
Question about Constructor
 
Actually, I have a C++ program in which I want to make a timer. The timer must be declared and created at the constructor of the program...What does this means?...
[no replies]
problem with syntax enum
 
hi all,when i was doing a small program ,i found somewhat funny in the enum declaration,i would like to talk about it,so that someone could help,why is it happe...
[2 replies] Last: C++ is case sensitive, just use enum Boolean{False,True}; (by LB)
How to make a source code of these executable files?
 
Hi!I'm new here and new to C++...I've been studying C++ for almost 4 months already...And I want to know the source code of these executable files....just follo...
[3 replies] Last: You can decompile a C++ program but writing from scratch is usually si... (by Bazzy)
My program crashes after a few moments, it has no compiling errors
 
Hi, I am totally new to C++ (2 weeks) and I've been doing this program (its my homework). The program is suppossed to build a database, so I'm in my first stag...
[5 replies] Last: Hi wasabi, Thanks a lot, your comment really got me going to try new ... (by claudiordgz)
string issues in header
 
Hello, I am new to C++. Currently I am writing a header file for my class. However, I keep getting errors relating to string. Here is my code. #include <s...
[1 reply] : you're missing std namespace. either replace string with std::string ... (by hamsterman)
How do I call a function that returns a vector pointer
 
In the following code I have made a standard call to a function that returns a vector pointer. Line 26 is obviously incorrect and I was wondering if anyone coul...
[4 replies] Last: Thanks LB. I'm teaching myself and Ive found no comprehensive tutorial... (by AlphaBravo)
decode a text file
 
This is my first post. I'm trying to write a simple program to open a .txt file which would contain an aviation forecast and decode it into simple english that ...
[3 replies] Last: You'll have to create a new file with the translation. This is because... (by wasabi)
by wasabi
Allocating on the stack
 
This is a pretty beginner question but I'm quite sure I'm right and I am quite clearly wrong, so I feel the need to ask: what happens when you dynamically alloc...
[13 replies] Last: AHA! Yeah, reading that in bold solved it for me. A pointer as an a... (by wasabi)
How to use a friend function in this code.
 
This code asks the user to input the reistance and voltage and calculates current and power - i'm learning friend function but i can't understand them. Could so...
[4 replies] Last: Thanks a million! It works perfectly now. Here's the final code: ... (by waqqassheikh)
How to add additional member functions to existing C++ objects.
 
Hello there, I'm not sure if what I'm trying to do is possible (I'd imagine it is). I am wanting to use the string class but I want to add additional functio...
[5 replies] Last: Thanks for the replies. I have actually implemented it the way yous ha... (by LoneJockRanger)
by dlugo
What does "ostream& os" do or mean in C++?
 
I have a function like this: void print(ostream& os, int number) { ..... } int main() { .................... print(number) } I ...
[6 replies] Last: You had a very dangerous logical error. char hexDigits = {'0', '1... (by ne555)
Guess the number
 
Write a program that asks the user to pick a number between 1 and 100. The program should then guess what the number is, asking the user at each guess if the co...
[10 replies] Last: my bad (by FeZedra)
Equals Operator Question
 
Whats the best way to say if (a==b==c==d==e==f==8){} ? Thanks, Eric
[14 replies] Last: That's a syntax error, right there. You need another ( after the if... (by LB)
August 2010 Pages: 1... 34567... 28
  Archived months: [jul2010] [sep2010]

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