Beginners - April 2009

I need to convert a pascal code to C++
 
I need to do a Homework and its been buzzing my skull cracked open. I have to write a program on c++ or modify this pascal code. to write,erase or find a ...
[3 replies] Last: If your course is in Pascal, you might as well learn it. It isn't very... (by Duthomhas)
by rain
SetConsoleTextAttribute causes an error (I wanna highlight entered name)
 
How I fix the code? When I run it and type something for name, I get error and program closes.I Want highlight Entered name with different color. /* scanf e...
[1 reply] : You need to turn your compiler warnings on and fix those errors. Using... (by Duthomhas)
substrings
 
i am trying to figure out how to get substrings from the users input. for example is the user enters wshoocskes as the input. i would ask the how many substring...
[1 reply] : http://www.cplusplus.com/reference/string/string/substr/ (by helios)
Problem using _rmdir()
 
Hi, i'm having trouble using _rmdir() It keeps giving an error code 13 (Permission denied) even though i've used _mkdir() to create the directory earlier in th...
[1 reply] : duplicate!! (by writetonsharma)
Questions about reading binary file into unsigned int arrays.
 
Hello, I am trying to read a binary file into an 2D unsigned int array.But the C++ .read() file i/o operation seems to work on char arrays only.Any one can s...
[2 replies] Last: 1. are you opening the file in binary mode? 2. reading binary is not ... (by writetonsharma)
by nanger
what is the default type of inheritance?
 
for example class A { ... }; class B: A {...}; here, the inheritance of B from A is private or public?
[1 reply] : try compiling this code and see.. :) (by writetonsharma)
by scuzzo
Linked Lists
 
As with most of my work I have managed to make it through most of the work assigned to me except I always have one problem that I can't fix. Here is a program t...
[5 replies] Last: This doesn't directly solve your problem, but IMHO, you really should ... (by jsmith)
by DTXL
Accessing/Storing values using Push_back()
 
If I have the following car class which just stores name and price: class car { private: string name; int price; private: //...
[1 reply] : http://cplusplus.com/reference/stl/list/push_back/ (by closed account S6k9GNh0)
by nanger
about enumeration
 
enum SchedType {OUTDEG=0, SQRT_OUTDEG, UPLOAD_BW, SQRT_UPLOAD_BW}; This is a statement written by a professional engineer, I don't know the reason why he in...
[5 replies] Last: thanks! (by nanger)
by bobsta
Problem with multiple indirection with nested classes
 
I am reading in data from a file consisting of a plurality of anatomical structures (10 < numStr < 50) defined by a number of contours (5 < numPlanes < 100), wh...
[1 reply] : Found offending line in code (line 11 of Plane::Plane(...) constructor... (by bobsta)
by luvsom
Nested switch statements and functions
 
My first time posting here so I dunno if Im doing this right or not.... I am trying to use nested switch statements to find either the area or volume. If i pic...
[6 replies] Last: Ahhhhh I see...Thank you so much!! (by luvsom)
couple random facts!!!
 
#include <iostream> using namespace std; int main() { cout << "The CDC (center for disease control) say's 1 in 5 adults have genital herpes.\n\n"...
[1 reply] : #include <iostream> using namespace std; int main() { ... (by masiht)
Fibonacci sequence problem
 
Not sure what to put in the title... Quite recently I took to trying to solve problems on "ProjectEuler.net". It's a website with loads of maths problems to ...
[4 replies] Last: Ohh! Thanks! Can't compile right now as I'm at school (it's 8:15AM in ... (by chrisname)
vector.pop_back() question
 
I am trying to remove an element from a vector, and I was told to use vector.pop_back(), but from the tutorial on this site, it claims the member function remov...
[1 reply] : check out vector::erase() (by kevinchkin)
What do I save codes as?
 
Hey I am JUST starting, and i need some help. I want to take some other people's codes, but I don't know what to save them as in a Notepad doc. Please tell me...
[5 replies] Last: It obviously depends on the O/S your using, if your using "vista" Dev-... (by anythingworks1)
So simple, yet hard for me...Not reading the date from file...
 
Need help with my program. It is supposed to read the data from the file and display it...so simple and I am struggling to see my problem... //This prog...
[9 replies] Last: Ok, I got it now. I changed the set width. Thank you very much I am go... (by musique)
by Lorena
An error I cant seem to pinpoint
 
This is what it says: error C2969: syntax error : ';' : expected member function definition to end with '}' but I believe all is set-up correctly... anyw...
[4 replies] Last: Turns out it was a conbination of both things... Thanks for the help ... (by Lorena)
by jayt
how does this program work
 
Can anyone please tell me how does this program work. #include<iostream> using namespace std; void write_vertical(int n); int main() { cout<<"write_ve...
[2 replies] Last: Thank you ! KBW (by jayt)
storing data
 
All the programs i write perform their assinged functions, no complaints. But is there a way for your program to store a string of data so when you open the pro...
[4 replies] Last: yeah thats what i was curious about == (include fstream and then read ... (by anythingworks1)
by jayt
dynamic memory alloction question
 
Hello , I have a test about dynamic memory alloction and I have studied about it.Can someone give me a program that uses dynamic memory or ask me any question ...
[14 replies] Last: thanks for the help . I am reading the tutorial here again. (by jayt)
April 2009 Pages: 123... 28
  Archived months: [mar2009] [may2009]

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