49,766 Topics

Member Avatar for
Member Avatar for Shaabangbang

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 …

Member Avatar for Shaabangbang
0
115
Member Avatar for hui

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 …

Member Avatar for Ancient Dragon
0
203
Member Avatar for tech291083

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 …

Member Avatar for Ancient Dragon
0
85
Member Avatar for bbycapr

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 …

Member Avatar for Ancient Dragon
0
85
Member Avatar for SHWOO

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 …

Member Avatar for John A
0
126
Member Avatar for countrygirl1970

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 …

Member Avatar for countrygirl1970
0
128
Member Avatar for earlyriser

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 …

Member Avatar for ~s.o.s~
0
288
Member Avatar for n.aggel

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 …

Member Avatar for Lazaro Claiborn
0
106
Member Avatar for niceliang84

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 …

Member Avatar for Ancient Dragon
0
146
Member Avatar for RisTar

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 …

Member Avatar for RisTar
0
251
Member Avatar for himanjim
Member Avatar for GreenDay2001
0
74
Member Avatar for jobra

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 …

Member Avatar for John A
0
135
Member Avatar for bigben09

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 …

Member Avatar for John A
0
126
Member Avatar for bigben09

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 …

Member Avatar for ~s.o.s~
0
272
Member Avatar for superlox3

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

Member Avatar for Lazaro Claiborn
0
112
Member Avatar for wparker

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 …

Member Avatar for Lazaro Claiborn
0
317
Member Avatar for n.aggel

[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: …

Member Avatar for n.aggel
0
322
Member Avatar for live_atl

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 …

Member Avatar for Lazaro Claiborn
0
118
Member Avatar for iaaan

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 <= …

Member Avatar for iaaan
0
171
Member Avatar for Joe689

[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 …

Member Avatar for Joe689
0
2K
Member Avatar for jobra

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 …

Member Avatar for Salem
0
103
Member Avatar for im4tion

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 …

Member Avatar for Infarction
0
154
Member Avatar for unclepauly

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(); } …

Member Avatar for thekashyap
0
230
Member Avatar for raydogg57

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 …

Member Avatar for John A
0
2K
Member Avatar for abhishekmittal

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 …

Member Avatar for John A
0
124
Member Avatar for Duki

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 …

Member Avatar for Duki
0
171
Member Avatar for SHWOO

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. …

Member Avatar for iamthwee
0
247
Member Avatar for dalton

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 …

Member Avatar for iamthwee
0
804
Member Avatar for Marks256

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.)

Member Avatar for Marks256
0
406
Member Avatar for n.aggel

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 …

Member Avatar for Ancient Dragon
0
152

The End.