49,766 Topics

Member Avatar for
Member Avatar for CPPRULZ

I am doing an online course and for one of the chapters (in [U]Practical C++ Programming[/U] by Steve Oualline) it had a bitmapped graphics section-only 4 pages long. The chapter is about bit operations and includes a section about hexadecimals. I understoodit until I got to this passage in bitmapped …

Member Avatar for ddanbe
0
327
Member Avatar for Trekker182

I have a small lab where I'm trying to dynamically allocate an array to hold whatever number of scores. We were given the code to pass it into a function that sorts those scores via pointer notation. However, when I try to pass the array into the function, I get …

Member Avatar for ArkM
0
484
Member Avatar for muya08

my program has the following errors: there are primary-expressions expected before "else" the upon commening on the lines with else, i got a mistake like "core dumped" and it couldn't run no more. could anyone please take a minute to go through my programm and kindly let me know where …

Member Avatar for ArkM
0
135
Member Avatar for thegodfather96

hello i am new in the programing and i want то learn c++.Where i can find good tutorials about c++ ---------------------------------------------------------------------------------------------------------- Thanks in advance

Member Avatar for Alex Edwards
0
54
Member Avatar for AcidG3rm5

[code] #include <iostream> #include <string.h> using namespace std; class Date { public : Date(); void setDate(int,string,int); void printDate(); private : int day; string mth; int year; };//end class //date constructor Date::Date() { day = 01; mth = "Jan"; year = 1990; } //setDate void Date::setDate(int inDay,string inMth, int inYear) { …

Member Avatar for ArkM
0
120
Member Avatar for jugnu

When i use a variable type [B]double[/B] the value [B]e.g 345624.769123[/B] rounded to [B]345625[/B] but when i take [B]5 digits[/B] before decimal [B]i.e 34562.4769123[/B] then it shows [B]34562.5[/B] Please explain Why? Thanks

Member Avatar for ArkM
0
175
Member Avatar for volscolts16
Member Avatar for Alex Edwards

I remade an equation-solver program from Java to C++, and I plan to post it soon but I would rather not until I can determine where modulus fits in with PEMDAS. To those who don't know, PEMDAS is the order in which mathematical expressions are to be evaluated. The order …

Member Avatar for Alex Edwards
0
7K
Member Avatar for a.self

Hi everyone, Since it's the weekend, I can't get assistance from my professor or his assistant until Monday. My deadline for submission is approaching and I'd feel a lot safer getting as much work as I can. I'm implementing a hash table to store strings using linear probing. My implementation …

Member Avatar for a.self
0
213
Member Avatar for Mako-Infused

I am making a encoder/decoder program. I have made most of it but I am stuck on the last bit. I would like when i decode the text it will oopen encode.txt, read it and change it back to normal (decode) the show it on the screen. If that cant …

Member Avatar for Mako-Infused
0
219
Member Avatar for BountyX

well lately I have been working on a CPU core for 6502 assembly, and I have been writing it all in c++. However for obvious reasons I was thinking of remaking the core in assembly. First I was wondering if it would be worth it (speed wise) to write functions …

Member Avatar for naradasu74
0
520
Member Avatar for amerninja2

Can someone either give me a couple links, or some code with explanations on how to create gui (graphical user interface) buttons that are like boxes with text and color in them, that are equal to a command when you click them. Also, how do you create a gui slider …

Member Avatar for amerninja2
0
179
Member Avatar for minas1

[code=C++"] int x[5]; x[4] = 10; *(x + 4) = 10; [/code] Array indexing has a cleaner syntax but (as I've read) pointer arithmetic is faster. My question is, is it worth to use pointer arithmetic? Is there a noticeable difference?

Member Avatar for ArkM
0
1K
Member Avatar for Srynx

When I include i++; inside this loop I get a runtime error and I have no idea why I get it: Do you have any idea? [CODE] while (i <= 3){ if (tauler[PacMan.y][PacMan.x]==0) xoc = 0; else if (tauler[PacMan.y][PacMan.x]==1) xoc = 1; else if (tauler[PacMan.y][PacMan.x]==2) xoc = 2; else xoc …

Member Avatar for Srynx
0
84
Member Avatar for techgenie

Hey guys Need help with the following program. I keep getting compilation error `error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion)` Apparently I am not able to pass by reference however it works well when I …

Member Avatar for Freaky_Chris
0
334
Member Avatar for thekevin07

I have written multiple streams of data to a file the format is like this [CODE] J|1|2|3|4 [/CODE] that would be 1 record and there are more then one record in the file my question is how do i read that data in, deserialize it, extract it and assign each …

Member Avatar for Lerner
0
340
Member Avatar for daviddoria

I have a base class called ModelFile I have derived classes called ObjFile and VtkFile that I would like both to use << from ModelFile. However, since << is an external function, [code] ostream & operator << (ostream &output, const ModelFile &Model) { output << "Num Vertices: " << Model.NumVertices() …

Member Avatar for Lerner
0
186
Member Avatar for ting_ting

can anyone help to solve this question using dev c++,i'am very poor knowledge in c++ sometime i'am very down to do question... please help me to write a program to display an array of characters in reverse order e.g input:hello reverse order:olleh note:you must make sure that the new string …

Member Avatar for minas1
-1
84
Member Avatar for wasayef

[B]Hi all How do you do the following operations in C++? 1. Opening Files in C++ 2. Closing Files in C++ 3. Reading Files in C++ 4. Writing Files in C++?[/B]

Member Avatar for minas1
0
62
Member Avatar for Manutebecker
Member Avatar for minas1

How can I allocate a 2D array? (on the heap) It needs to be dynamically allocated because the values of rows and columns aren't known.

Member Avatar for ArkM
0
122
Member Avatar for lilnedy

What would be a good tutorial for Hangman. I have an assignment where I need to create the game using five classes. I found a couple online but they are incomplete. I'm a beginner to c++ and I would appriciate any help or guidance from you guys. Thanks in advance …

Member Avatar for VernonDozier
0
108
Member Avatar for the_swan

hiiiiiiiiiiiiiiiiiiiiiiii i'v a problem with dowing a circle in opengl I want to drow a fram of circles but my circle function did not implemented this the code that I try #include <windows.h> #include <gl\gl.h> #include <gl\glu.h> #include <gl\glut.h> #include <math.h> static void redraw(void); int main(int argc, char **argv) { …

Member Avatar for Rashakil Fol
0
159
Member Avatar for dtaylor01

I have to write a C++ code that computes the greatest common divisor of two numbers. When Declaring x, y, temp, remainder as a Integer is this right? Or can someone help me in the right direction. [ICODE]int x = 0; int y = 0; if (x < y) then …

Member Avatar for mrboolf
0
78
Member Avatar for Jacky1

ok lets say I have my code file in my web server and any one can call that functions in that file ( assuming they know the name of the functions ) but they can't see the actual implementation in other word they can use the implementation but they can't …

Member Avatar for Jacky1
0
85
Member Avatar for Jacky1

I did make my dll file out off those two files dll.h [code] #ifndef _DLL_H_ #define _DLL_H_ #if BUILDING_DLL # define DLLIMPORT __declspec (dllexport) #else /* Not BUILDING_DLL */ # define DLLIMPORT __declspec (dllimport) #endif /* Not BUILDING_DLL */ DLLIMPORT void welcome(); class DLLIMPORT DllClass { public: DllClass(); virtual ~DllClass(void); …

Member Avatar for Jacky1
0
117
Member Avatar for daviddoria

I would like to declare the type of an object based on user input. Ie. I would like to do the following: [code] string obj = //get from command line arguments if(Format == "obj") { ObjFile Obj; Obj.Read(InputFile); Obj.DoSomething(); Obj.Write(OutputFile); } else if (Format == "vtk") { VtkFile Vtk; Vtk.Read(InputFile); …

Member Avatar for ArkM
0
130
Member Avatar for needhelpincplus

i have added a function to make selection sort to my code but i can't adjust it. i need that someone try the code and try to adjust it so can someone help me to adjust it plzzzzzzz....and try to help me in sorting in an ascending order by using …

Member Avatar for Freaky_Chris
0
105
Member Avatar for itsmeabhi_01

Dear friends I want to create some projects real time projects so that i am well equipped in making cutting real edge projects .....could you please submit some websites which explain some real code like making some text editors in C++ or C(text editors is just an example)I know the …

Member Avatar for ddanbe
0
103
Member Avatar for starletcharmed

Hi, can anyone help me fix my code. This program is linked to a project list (with classes). This is the main program. It has to open up a file of strings and output then in order of how many there are. But its not working though. Can someone help …

Member Avatar for Ancient Dragon
0
113

The End.