51,593 Topics

Member Avatar for
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
235
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
592
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
474
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
115
Member Avatar for kytro360

Hi, Does anyone know how to create a delay in C#? I dont like to use Thread.Sleep because it makes the GUI unresponsive. Do you know of any good alternatives?

Member Avatar for Mitja Bonca
0
296
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
136
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
27
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
190
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
326
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
159
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
128
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
266
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
443
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
166
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
394
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
136
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
188
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
223
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
133
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
87
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
145
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
106
Member Avatar for sharath_137

I need to take difference between two dates in normal date format like "2012-03-30 17:21:33.027" using time_t..previously i was using unix timestamp so i used data type long int...but i need to know how to compare using time_t... plz help.....

Member Avatar for L7Sqr
0
59
Member Avatar for mkerala

A program to solve the following problem. You can use C, C++, C#, Java or Haskell to code your solution. **The problem** You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of …

Member Avatar for thines01
0
1K
Member Avatar for FazeLessWhite

Hello Everyone , I Have Made a Simple C++ Code And I Get Some Errors I Have Been Trying To Solve this For Like 2-3 Days :( I am a Beginner in C++ #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main() { for char name[100]; int age; …

Member Avatar for zeroliken
0
119
Member Avatar for sujskiez

Write a C++ program such that its execution will keep asking the user to enter a pair of integers, start and finish, and will terminate when either start>finish, or EOF or an invalid input has been encountered. Every time a new pair of integers start and finish are read, the …

Member Avatar for zeroliken
0
201
Member Avatar for fka

Hello. I have some problems with recieving text from ListBoxItem. My code is below: ListBox list = (ListBox)this.FindName(e.Parameter.ToString()); ListBoxItem item = (ListBoxItem)list.Items.GetItemAt(0); //****here is exception**** T.Text = item.Content.ToString(); list.Items.RemoveAt(0); The exception throws: Unable to cast object of type 'System.String' to type 'System.Windows.Controls.ListBoxItem'. My ListBox contains numbers, but it does not …

Member Avatar for fka
0
198
Member Avatar for CPEBB

help me please this is a code #include <iostream> #include <string> using namespace std; class Student { private : int StudentID ; string FirstName; string LastName; string CourseName; double FirstExamGrade; double SecondExamGrade; double AssignmentsGrades [5]; double FinalExamGrade ; double Avr_Of_Assignment; double TotalGrade; public : void SetFirstName (string S1); void SetLastName …

Member Avatar for CPEBB
0
383
Member Avatar for fanii

1**. Write a c++ code to copy the contents of one string s1 into another string s2 by using loop where s1 and s2 are two dynamically created pointers.**

Member Avatar for ravenous
-1
43
Member Avatar for dakerao

Hello all I have a bunch of aggregate elements within my array. This array is for vertex positions in OpenGL. and I need to make a switch without having to bind more data to OpenGL. To do this I must put an if statement within the array or a booleon …

Member Avatar for MandrewP
0
198
Member Avatar for kkb08

I'm trying to write a program that asks the users for a set of numbers which the program then sorts and counts the frequency of. I struggling with understanding arrays. I have one array in particluar called frequencyArray that I'm trying to print but it keeps returning the value 0. …

Member Avatar for MandrewP
0
222
Member Avatar for dark_sider_1

Hi there, I feel really stupid since I'm a beginner at OpenGL with drawing. Is there something that I'm missing in the code? The line doesn't show up on the screen. Thanks! glClearColor(1.0f, 1.0f, 1.0f, 1.0f); glBegin( GL_LINES ); glColor3f( 1.0f, 0.0f, 0.0f ); glVertex3f( 100.0f, 150.0f, 0.0f ); glVertex3f( …

Member Avatar for mike_2000_17
0
979
Member Avatar for phorce

Hello, I'm trying to split a matrix (512x512) into blocks of (16x16).. Now I have managed to complete this for a small matrix (4x4) but when I try to implement it using the 512x512 it fails and doesn't produce enough blocks for the entire matrix. Here is the code on …

Member Avatar for histrungalot
0
202
Member Avatar for phorce

Hey, I'm doing a project and on the last little piece. It involved taking 2 matrices, splitting them into blocks and then checking whether the blocks are simular or not. If the blocks wasn't simular, then swap them /or/ create a new Matrix that holds the values of the second …

Member Avatar for histrungalot
0
105
Member Avatar for dark_sider_1

Hi there, I'm sorry if this is a vague question, but I've just been assigned to create a color animation project with GLSL, and I've never really used it before. The criteria for the assignment is that the animation should depend on object coordinates, vary over time and should use …

Member Avatar for dark_sider_1
0
282
Member Avatar for Chuckleluck

Hello, I would like your opinion on my collision detection & jumping code. Is it efficient enough to be used in a full-blown game? Any ideas on how I could improve the efficiency of the code? Any bugs? Please reply with (constructive) criticism, comments & suggestions. Link: http://dl.dropbox.com/u/56274235/Working%20Collision%20Detection%20%26%20Jump.zip Thank you …

0
111
Member Avatar for ABDYY

Hello everyone..... The code bellow is a program that output single_sound with every Character printed on the output screen... #include<iostream> #include<string> #include<Windows.h> #include<mmSystem.h> using namespace std; int main() { system("color 0A"); string s="Welcome"; for( int i=0;i<=10;i++) { for ( int j=0; j<s.length(); j++) { for( int k=0; k<1; k++) { …

0
40
Member Avatar for jasleen_kaur

Hello, I want my program to take input from a file rather than from keyboard and also output it to a file not screen. I tried writing prgram. This is what I wrote in visual studio... 1. #include<iostream> 2. #include<conio.h> 3. #include<stdio.h> 4. using namespace std; 5. void main() 6. …

Member Avatar for jasleen_kaur
0
1K
Member Avatar for bathtubbuddy

Hi everyone, im programing an agenda in c++ but im having a little trouble erasing an entry. Sorry the code is long, i was too lazy to use call functions... anyways bear with me. i tried setting the value to NULL on the entry i want to erase but that …

Member Avatar for Lerner
0
213
Member Avatar for jonnyboy12

Hello all. I am working with threads at the moment in my program. The thread is simple and looks like this. Thread oThread = gcnew Thread( new ThreadStart( this,&qualifiedlist::ThreadProc ) ); oThread->Start(); I have another simplar thread like this but its more complex. I try to set variables in it …

Member Avatar for mike_2000_17
0
118
Member Avatar for Tinier

Recentlt, I need to insert comment in my pf document, but I never try it and finds little information from the intenet, but I found that the PDF has the function of showing the comment and hiding the comemnt, so I try to convert a word document that contains comment …

Member Avatar for pattmorter
-1
205
Member Avatar for eliokdc

#include<iostream> #include<conio.h> using namespace std ; int main (){ string name; cin>>name; cout<<name; cout<<endl; getch(); return 0;} //if u run the prog, and u enter ur first and last name after hitting enter it will show u the first name. My professor asked me to search why this is happening, …

Member Avatar for ob3sus
0
96
Member Avatar for Borgan

Hello, I'm new here and I could use some help please. Im trying to learn c++ with a book called Programming Principles and Practice Using C++. Im on Chapter 3 now, and so far not having to many problems. But i am stuck on one of the exercises at the …

Member Avatar for ob3sus
0
213
Member Avatar for Tinier

Recently, I meet a problem that I need to insert header and footer in excel with C#, I use the following code: Worksheet sheet = workbook.Worksheets[0]; sheet.PageSetup.FullHeaderString = "E-iceblue"; sheet.PageSetup.IsPrintHeadings = true; sheet.Visibility = WorksheetVisibility.Visible; sheet.PageSetup.LeftFooter = "everlasting"; But when I launch it, the header and footer do not appear …

Member Avatar for Tinier
0
296
Member Avatar for iweir

So I'm working on an assignment where we have to make a deck of cards using a Card class and a Deck class and when I try and test the constructor by testing the size i get this: Running 1 test*** glibc detected *** runner: free(): invalid pointer: 0x00902ff4 *** …

Member Avatar for iweir
0
175
Member Avatar for greatman05

Is there a way to create a dynamic array without necessarily knowing the size beforehand? I need to specifically use a dynamic array for a homework assignment, and I don't really want to ask the user how large the array should be (in this case, an array of chars i.e. …

Member Avatar for greatman05
0
139
Member Avatar for Labdabeta

I want to find a range of values that a valid pointer cannot achieve, but can store. Basically this is my situation: typedef struct myNumberTAG { //stuff }*myNumberHANDLE; //A bunch of functions that work with myNumberHANDLEs: ///Not Shown //Some constants const myNumberHANDLE numberOne=0x1; const myNumberHANDLE numberTwo=0x2; const myNumberHANDLE numberInfinity=0x3; const …

0
56
Member Avatar for stormik

Hi there, I need to overload istream in this way: it needs to get string, then it has to parse this string and get number - can be longer than long long, and then save this number in another string, which I will give to class method. So far so …

Member Avatar for stormik
0
327

The End.