49,761 Topics

Member Avatar for
Member Avatar for Labdabeta

I want to test some graphics work I am doing with the Utah Teapot model. The issue is that all the data I can find on it uses bezier patches (which I have no clue how to render) does anybody know how I could get the data in a form …

Member Avatar for Labdabeta
0
523
Member Avatar for phummon

Hi everyone, I’m Pete, moderately-experienced C++ user who is always looking for better ways to do things. Let me ask you guys about a problem I’ve scratching my head over lately. Suppose I’m writing a program designed to simulate a large company. I’m interested in tracking each company employee by …

Member Avatar for phummon
0
210
Member Avatar for Anthuny

I'm currently working on a project, trying to create a small game. When I run the program, it's supposed tp draw out the game characters, save them, then erase the screen and draw the next one. It works fine if I only getimage for one, but if I use malloc …

0
50
Member Avatar for needforkevin

hello! i have written a program to read in a text file and then ask the user to process the file with a different sorting method. so far i have been able to get my program to read in the file but my bubble sort seems to not be sorting …

Member Avatar for needforkevin
0
241
Member Avatar for sasho648

I've made some functions which can insert file inside a file but only with a small text files and they're very slowly. I will thank you if someone know a better way. Here are my functions: 1st struct Tree { char Symbol; Tree* next; } ; Tree* GetTreeHandler(unsigned long num) …

Member Avatar for sasho648
0
246
Member Avatar for khanthegamer

**Okay i have a problem that i am not able to sort out for couple of days now. I dont know why the code is not doing what it supposed to do. Basically I have written this code for a vending machine. Things i want in a vending machine ------------------------------------ …

Member Avatar for khanthegamer
0
158
Member Avatar for CGorelik

Hello, my name is Carol. I'm currently taking an introductory course in C++ and we just learned about functions. I was wondering about the standard accepted format for placing function definitions. For instance, in the following program, should I have defined the power function before the int main function instead …

Member Avatar for deceptikon
0
296
Member Avatar for Tygawr

I need to be able to read and write huge files that nearly weighs 20+GB and I need to do it fast. Any suggestions or tips? Thanks.

Member Avatar for BobS0327
0
230
Member Avatar for cryonize

Can anybody tell me what's wrong with my selection sort of linked lists? It's meant to sort the whole node, not the data. #include <iostream> #include <iomanip> using namespace std; typedef struct node { int DATA; node *NEXT; }; node *HEAD = NULL; void Create(int data); void Display(); void Sort(); …

Member Avatar for Nick Evan
0
580
Member Avatar for jhdobbins

included is my entire program... i know exactly what the problem i am having with this is, i just cant figure out the logic to fix it... ive tried about 10 different things so far. I have it so you can input which position you start at... then go around …

Member Avatar for Nick Evan
0
470
Member Avatar for jonnyboy12

Hello. I have a unique situation. I have so many text box's in my form that i wound up making a text box array. Now each text box i make i have to give it a mouse clicked event and mouse moved event. I cannot write these event functions for …

Member Avatar for Milton Neal
0
112
Member Avatar for CCBB

Assignment #2 Write two classes Class RestaurantMenu that has the following members class RestaurantMenu { double price[10]; string Menu[10]; int numMeals; public: RestaurantMenu(); void AddToMenu(string s, double d); void DeleteFromMenu(string s); void ShowMenu(); double FindMeal(string s); }; The Constructor: will fill the price array with zeros and fill the Menu …

Member Avatar for CCBB
0
132
Member Avatar for sanket1512

hello, I want to get File Name in specific folder with specific extension by using CPP in linux.. example.... suppose Full File Pathname is /data1/test.txt then I want to handle a code with directory /data1/ and extension .txt then code should get file name as "test". this can be achieved …

Member Avatar for richieking
0
26
Member Avatar for pattilupwned

Hey all, I'm a beginner programmer and need help here. I can't figure out how to translate a word that begins with a consonant. I have all the code to translate a word that begins with a vowel, and those words translate correctly, but I cannot get the words with …

Member Avatar for pattilupwned
0
2K
Member Avatar for TheWind147

Hello, I am in the process of creating a program that accepts random numbers, put them in an array and sort them using different types of sorting algorithms. I then passed the array as an argument to the "BubbleSort" function, however, when I try to call the array in the …

Member Avatar for TheWind147
0
187
Member Avatar for POOPdeek

Hey guys. I am somewhat new to the C++ language and was wanting to make a basic text editor. For this i was going to use Nodes and linked list to accomplish this. the main thing i need help with at this moment is creating a command prompt for the …

Member Avatar for Ancient Dragon
0
321
Member Avatar for johans22

I was reviewing the code at the following two sites. I noticed that memory allocation "new" has been used to allocate space for the Node(s). How are they freed?. very good codes. http://visualcsamples.blogspot.com/2010/11/sparse-matrix.html http://www.syntax-example.com/Code/implement-subtract-function-big-number-992.aspx

Member Avatar for jackmaverick1
0
155
Member Avatar for murnesty

I know the purpose of keyword but then I still not really know when should i use. But I sure I will optimize my code. So is it ok to i use volatile keyword on all my variables? So that it won't optimize the wrong thing.

Member Avatar for mike_2000_17
0
124
Member Avatar for deval90

/***** The prompt i have is : use a class with 3 member functions named InputMatrix, Calculate, and OutMatrix. The program will prompt the user to (e)enter the matrix data, (c) to calculate the matrix multiplication, (d) to display the input and output matrices, and (q) to quit. no exit() …

Member Avatar for mike_2000_17
0
260
Member Avatar for pjh-10

if ive a 1000 songs,using shuffle whats the probability, on average, how many tracks will be played before a previous song plays again. tricky probability Q, getting a few different answers, with some variation of accuracy!! thanks

Member Avatar for pjh-10
0
435
Member Avatar for rezonk

#include<iostream> using namespace std; struct Student_Record{ int id_num; int assignment; int quiz; int test; char grade; }; void get_data(Student_Record &p); int calc_mark(Student_Record p); Student_Record read_data(); void print_all(const struct Student_Record p{}); int main() { Student_Record amir,naim, amirNaim[2]; int amirtotal_mark, naimtotal_mark; get_data (amir); amirtotal_mark=calc_mark(amir); if (amirtotal_mark>=60) amir.grade ='p'; else amir.grade='F'; naim= read_data(); …

Member Avatar for nullptr
0
164
Member Avatar for jackmaverick1

I have a project going (the idea for which I got from a website a couple of years ago) and its been going pretty well. However, I have come upon a strange error, which I can't find the source of (well, I know the source but I don't know what …

Member Avatar for histrungalot
0
392
Member Avatar for jtbens01

Hey guys, I'm getting some kind of linker error. Any help would be appreciated. Here is what I have.. Header File: #ifndef _LinkedSortedList_ #define _LinkedSortedList_ #include "LinkedNode.h" #include "SortedList.h" template <class Elm> class LinkedSortedList : public SortedList<Elm> { public: LinkedSortedList(); ~LinkedSortedList(); void clear(); bool insert(Elm newValue); bool getfirst(Elm &returnValue); void …

Member Avatar for jtbens01
0
131
Member Avatar for BryantFury

Hi ive developed a code that does 2 things. It is about 20 students doing a test and getting a mark out of 100. First is using the class, it will look in a file, display the names of all the students(20) and their respective test scores.It will also show …

Member Avatar for BryantFury
0
183
Member Avatar for Runnaz

I Got STUCK ON PART 7, would appreciate it if someone can help out. I have it due on sunday Thanks we are going to implement a slightly different version of Roulette. In our version there will be only one player and the winner is determined solely by the slot …

Member Avatar for Lerner
0
220
Member Avatar for nana0

I am getting the error from the title, when I try to execute this piece of code : list<Part>::iterator i = bullets.end(); --i; if (!dartCollided) { dartCollided = true; Part *temp = &(*i); &(*i) = new BrokenPart(*i); //line giving the error delete temp; } Could someone help me point out …

Member Avatar for Moschops
0
131
Member Avatar for Nathaniel10

I am teaching myself C++ and wrote a program that does the queue data structure. It runs corectly. I would like some feedback on how I can improve the program to make it run faster, use fewer lines of code, or be clearer to someone else. I haven't added my …

Member Avatar for Nathaniel10
0
84
Member Avatar for prathibhans

can anyone send the c++ code to count the number of repeated words in a text file...

Member Avatar for zeroliken
0
31
Member Avatar for BryantFury

Hi im trying to create a code where it would read from a separate text file some names and grades, then display them. However i am asked to use a class to "store"(if thats the word) them as below: #include <iostream> #include <fstream> using namespace std; class student { private: …

Member Avatar for BryantFury
0
142
Member Avatar for Runnaz

I Got STUCK ON PART 7, would appreciate it if someone can help out. I have it due on sunday Thanks we are going to implement a slightly different version of Roulette. In our version there will be only one player and the winner is determined solely by the slot …

Member Avatar for Lerner
0
102

The End.