Beginners - July 2011 (Page 27)

object array
 
hi everyone, i have a problem with declaring array of objects `cause this isnt working... SpellStats spell ={SpellStats(true, 5, 25, 8), SpellS...
[9 replies] Last: thx sohguanh... but as I though it is only causing errors in vc++ in ... (by julof26)
Copying Files
 
is this an adaquate way to copy a file? #include fstream using namespace std; //totally just wrote this code in this forum text box // there could be...
[6 replies] Last: Ok I tried to do what everyone here said and use the CopyFile function... (by tam0009)
by tshah
Default Arguments
 
Hi All, I have a little doubt about default arguments in C++. void printData(char name ,int age=24,int workex=3); The above function has 2 default ...
[2 replies] Last: EDIT: Snipe'd by sohguanh. Unfortunately he did not understand what yo... (by LB)
by alhanz
Calender Alert Reminder
 
Hello everyone, I'm trying to make a calender reminder program where it acts like a alarm clock. For eg.. 1). User enters the input date and event name call...
[10 replies] Last: In windows there is task scheduler, of course. (by modoran)
Emergency help
 
I've been taking a class on scripting that ends today and I can't figure out the last few errors I'm having. The teacher isn't helping either so I came here. I ...
[12 replies] Last: this while (right = 0){ should be while (right == 0){ . Note ... (by shacktar)
Why are structures slower than arrays?
 
I have been reading about the differences between C and C++, and notice that people often say C++ is 'slower' because it uses classes. This statement seems a...
[6 replies] Last: C++ isn't slower than C. Object-oriented design, in general, is likel... (by jsmith)
by stuted
project
 
Hi guys, my question is a short one: how did you learn c++ and how long it did take to be a decent programer with the language? I did develop lots and lot...
[14 replies] Last: I believe someone in this forum has done it via the C/C++ approach. Yo... (by sohguanh)
Use of Pointers
 
I recently came across a code that i didn't really understand. void putstr(char *s) { while(*s) putchar(*s++) } I didn't understand...
[3 replies] Last: Typical C programming code. For beginners, below would be clearer. ... (by sohguanh)
functions (1,2)
 
hi, I have the following code, and I'd like to put the if statements in a function, which will return the value of variables 'flag' (can have values U or D for...
[39 replies] Last: sounds good....I will try that... (by itcplpl)
Noob needs help with homework
 
Howdy, So after 3 days of rewriting this over and over. I decided to ask for help... This is the assignment, I realize rarely do coders just give out ans...
[12 replies] Last: Hi Lee Booker, professor teaching is a job just like a developer. Very... (by sohguanh)
Problem with reference to pointers
 
The program below has a segmentation fault at the emboldened line. I'm not very good with these, could someone help explain what I've done wrong. #include...
[3 replies] Last: int* returnPosition; //uninitialised (points to garbage) this->numbe... (by sohguanh)
by barbis
delete char
 
Hello all, why does the following works on build time but the program crashes on runtime? char *seedx = new char; char *seedy = new char; ...
[9 replies] Last: #include <boost/lexical_cast.hpp> using boost::lexical_cast; I be... (by sohguanh)
Infile.open
 
I am new as you can tell , and lost..We are doing input text file and read the file For example:(Bobfile.txt) Joe Will 255-68-9842 45 10.70 Output 9842 ...
[9 replies] Last: My gross keeps creeping up , 1st 5 lines are OK , then it starts going... (by lookup12)
program draining cpu usage
 
hi guys im very new to C++ programming and have tried to build the program below but when i run it it drains my computer and it takes ages to load anything. How...
[5 replies] Last: thanx for the help. the reason im trying to do this is because my mate... (by tish112)
by wkkzz
output of funtion
 
Hi I have what I thought to be an easy function in a queue simulation. Since it is from the textbook I expect it to work but I am getting odd output. The...
[8 replies] Last: dooh now to figure out the real bug. (by wkkzz)
ios problem!
 
#include<iostream> #include<fstream> using namespace std; main(){ short a; fstream Kaynak; Kaynak.open("Kaynak.txt",ios::i...
[5 replies] Last: thanks it solved all my problems (by closed account 9wX36Up4)
Beginner for loop problems ):
 
Hi, my code seems to stop running(I get a process error and it prompts me to shut down the program) after the first for loop. Could someone help me pinpoint ...
[17 replies] Last: It at the end of each iteration it deletes it, then at the beginning i... (by LB)
Program that counts number of words from input stream/file
 
This program is supposed to count the number of letters/words in an input file. Here's my code thus far: #include <fstream> #include <iostream> #include <...
[5 replies] Last: It looks as though lines 73-76 will give a 1 and lines 78-85 will give... (by Audie)
"Function Does Not Take 0 Arguments" Error
 
Help! I have been trying to figure this error out for an hour and can't get it! // DayOfTheWeek.cpp : main project file. #include <iostream> #include ...
[3 replies] Last: I'm puzzled. string DayOfTheWeek::plusOneDay(int addDay, int &iNum,... (by Moschops)
by cdd
Debugging in Eclipse
 
Hi, Is there any way to view the contents of a std::vector while debugging in eclipse? When i was using Visual Studio I could view the vectors contents while...
[1 reply] : Given a vector<T>, cast _M_start to T* and dereference to see the firs... (by jsmith)
July 2011 Pages: 1... 2526272829... 54
  Archived months: [jun2011] [aug2011]

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