49,766 Topics
![]() | |
Hello, i am currently a First year university student, and i am taking an advanced C and C++ programming course, but i am having difficulties.. i do not know how to study for it, i did miserably on my first midterm, and i need to pass this course, does anyone … | |
Hi guys..I am trying to make a program that can calculate the time difference in days from the current date..here is my code...it is bringing some bit of a problem...please help me out!Thanks [code] #include <iostream.h> #include <cdate.h> class Date { public: int month; int day; int year; static int … | |
Hi, I am using Fedora Core 5 32+bit as my os but not using a particular development tool as of now and just sticking to the normal text editor called the KWrite. I am learning C++ and MySQL on my own and want to know if the connection between the … | |
Hi, I have to write a program that can connect family members. The program should be able to input a name and find the parents and/or granparents of that person. I was wondering how to do this and i have no idea where to start. I am a beginning student … | |
I have implemented inheritance and in the print function for class playertype I have called the print function from personType. When I call the playerType fucntion print() with a playerType object only the playerType variables are printed and not the personType variable firstName and lastName. [code] #ifndef H_personType #define H_personType … | |
I am in Advance C++ and trying to add a class to this program that I wrote for my lab. Could someone help me to understand more on class objects and help me on this code cause I am losing my lunch on this. Thanks, Melissa [code] #include <iostream> using … | |
Hello I'm trying to assign a value from a string via some pointer, but I got an error and I cannot figure how to solve it. Do you have an idea? I would really help me. The problematic line is marked between ********* Thanks. [CODE]// reading a text file #include … | |
i have 10 different classes-objects that are controled by a another class{call it Central class). All 10 classes need to write to the same file(not at the same time). Is it better to have central class control the stream and pass it to the other classes, or each class should … | |
im newbees in doing C++ program, now i face a problem where i need to open more than one ".dat" file in a single program. the coding that i use is... ifstream input; input.open("Luc.dat"); if (input.fail()) { cout<<"Unable to open a file \n"; exit(1); }//end if while(input>>keyword>>index2) {//write to Alphabet … | |
hi , im pretty new to computer science and alose to this community . i have a problem that im trying to solve and hope you guys can help me with it . im trying to create my own version of the function "atoi" that can be found in stdlib … | |
Hey friends , is it possible to send email using program in C/C++? ![]() | |
Hi all, I am trying to use the class as a vector and pass parameters to the class. In loop.run(), I do certain things, then I would like to delete all the elements of the class. [code] 1 class SampleMarketDataClient 2 { 3 .... 4 }; 5 int main() 6 … | |
Hey i need with this program it works, but i cant figure out how to make it not print out zeros when it is reversed. for example when the user types in 123000 it should print out 321. but my program prints out 000321 what can i do to make … | |
is there a way to tell the program to remove a certain charecter or number from a string with out giving it a position. for example i have a program that asks the user to enter a set of numbers and the program reverses the order of the numbers. so … | |
I don't understand strings at all. I looked at the tutorial but I still don't get it... Is there any tutorial that can be easily followed for inputting strings (no skimmers)? -Superlox3 | |
hi, i'm using c++ in cygwin environment under win32 .my classes use the xercesc c++ libraries which i have built with cygwin on windows. my c++ source code compiles into .o files but the linker just wont work. my LIB env. variable is set to /cygdrive/c/lib , lib directory exists … | |
[code] enum MenuOptionInitial { TEST_ONE = 1, TEST_TWO, TEST_THREE}; switch(selection) { case TEST_ONE: //.... case TEST_TWO: //.... case TEST_THREE: //.... } [/code] the problem is that i want to have another selection base on other options [code] i.e. enum MenuSecond { TEST2_ONE = 1, TEST2_TWO, TEST2_THREE}; switch(another_selection) { case TEST2_ONE: … | |
Consider the two equations p = cos(p), p = sin(p) with solutions 0.7390851332151607 (approximately) and 0 respectively. Implement three programs for the solution of these two equations. (a) Fixed point iteration: pk+1 = g(pk). (b) Fixed point iteration with Aitken acceleration. (c) Steffensen’s acceleration. In each case, begin with p0 … | |
Hey, i am trying to do a sort in C++. I have a strucutre of different records such as Quote number, Surname, Total cost and Deliverycost. I am trying to sort in order of Quote Number. Im using a bubble sort to do this: [INLINECODE] for(i = 1; (i <= … | |
[COLOR=#0000ff]for[/COLOR][COLOR=#000000] (i = 0; i < length; i++)[/COLOR] { [COLOR=#0000ff]for[/COLOR] (j = 0; j < width; j++) { [COLOR=#0000ff]for[/COLOR] (k = 0; k < height; k++) { interpolated_1D[i* j *height + k] = interpolated_input[i][j][k] ; } } } Doesn't seem to work,,, What am I doing wrong... Everything is allocated … | |
Hi all, I want to write every given number of lines into the different files, which I will be passing as an command line argument. I have written a function for just dividing the file into two, but how would I divide the files for every given number. If anyone … | |
Hi. I have a bunch of Java codes I have done and I was wondering if there is a possible software or program to convert it into c++? This is because I've done it in Java and now my lecturer wants it to be in c++ >< The concept is … | |
i have a BaseClass and a DerivedClass. i need the BaseClass to register a glut callback, but i need the DerivedClass to determine what the callback does. heres the code: (.h) class BaseClass { public: BaseClass(); ~BaseClass(); protected: static void _renderCallback(void); virtual void Render(); }; (.cpp) BaseClass::_renderCallback(void) { Render(); } … | |
For this assignment I need to implement a c++ class that creates a ring buffer. A ring buffer still uses an array, but its has two indices, i..e., the head and the tail. Note: The head is the index of the first data point, and the tail by definition is … | |
Hello friends, Can anyone plz tell me the difference between a using declaration and using directive ? I know this: A using declaration adds a particular name to the declarative region in which it occurs. whereas, A using directive makes all the names in the namespace available without using the … | |
Hey guys, I need help again :sad:. I'm doing really well in the class, it just seems like these past couple assignments have been really rushed (i.e., we went over chapter 5 the day after I finished reading chapter 4 =/). I'm getting sort of discouraged, because up to now … | |
I have overloaded the << & >> operators and I though I could access private data members of the class if I declared the functions friends of the class. I am getting four errors in the two overloaded functions that are trying to access the private members firstName and lastName. … ![]() | |
ok so im scanning this text file for the string "model=" the problem is, i need to pull the numbers after that string until it reached the end of that line, this is an easy script but for some reason its just not happening. If someone smarter than myself could … ![]() | |
I am just curious about the pros and cons of each. Please leave your opinion(s). Thanks! (sorry the question is so broad, but i just wan the pros and cons of each.) | |
hi, to get the current time you use this statement: [inlinecode] time_t now = time(0); [/inlinecode] i was wondering how can i check the time stored in this variable if it falls in a specific time interval, i.e. between 5 and 6 am. I am thinking one way to do … |
The End.