49,761 Topics

Member Avatar for
Member Avatar for loushou

I am trying to dump 2 longs, an array of floats and DWORDs, and an array of shorts into a file, USING BINARY out mode. Here is my code: [CODE]#include <windows.h> #include <fstream> #include ".\vertexs.h" using namespace std; int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { OURCUSTOMVERTEX p_verts[5] …

Member Avatar for Duoas
0
98
Member Avatar for olams

Hi, I am writing a program about getting the nth fibonacci number using a class that i have created. I am having problems with it. Any help is greatly appreciated. [code] *void lfib(int a){ int i; eArray x(500), y(500), ans(500); x=y=1; for(i = 1; i<=a; i++){ ans = x + …

Member Avatar for Duoas
0
64
Member Avatar for Flixter

Can someone help me with this task? Write a C++ class that implements all the functions of an ordered dictionary using (2,4) tree??? Needs me for today if someone now somethnig pls send something.

Member Avatar for Narue
0
103
Member Avatar for sasdap

How to integrate python and c++? Can you help by telling the steps to follow?

Member Avatar for sneekula
0
45
Member Avatar for dexter1984

Hi, I did some C++ assignments and was confused about a certain code. [CODE=language] #include <iostream> #include <iomanip> using namespace std; int main() { long result, input, num, count; count = 0; cout << "key in number"; cin >> input; while (input>0) { count++; input /=10; } cout << count; …

Member Avatar for dexter1984
0
92
Member Avatar for hattusili

hi, when i compile my c code at visual C++ 6.0, i got some errors and i can't fix it, please help.. my C file uses the unistd.h and the code is /* This is defined as a real library function to allow autoconf to verify its existence. */ int …

Member Avatar for Salem
0
232
Member Avatar for BlackPelican

I am taking a C++ course, though I am far behind due to my inability to grasp the material. and i must complete 3 projects by Jan. 29. I am having ALOT of trouble implementing the switch statement, and I don't know how to make it loop back the user …

Member Avatar for Salem
0
982
Member Avatar for abar

Hi, I want to have a button in Borland C++ builder 6, for which the background color can be changed. The default TButton available in bcb 6 is wrapper to the windows button & does not have the color property. I went thro the net & found some code for …

Member Avatar for abar
0
277
Member Avatar for kux

here is the thing: i have a constructor that calls a member function, the function throws an exception, i catch the exception in the constructor, free all dynamic allocated variables and then rethrow the exception when i rethrow i get this: Unhandled exception at 0x10210e32 (msvcr80d.dll) in Test.exe: 0xC0000005: Access …

Member Avatar for kux
0
223
Member Avatar for tonyaim83

Hi My input string is as follows :- ABC<-AFC:RFS<-DRP:KLE<-SJS:KLS the required output string should be ABC<-AFC<-DRP<-SJS Means to strip down every string after :(colon) How should i do that kindly help.

Member Avatar for Ancient Dragon
0
56
Member Avatar for Ajuddy

HI, I am still new in this language. i would like some help. i need to write a program that finds an avarage marks of "y" students by rerunning and terminating the program. i need this in a 2 dimensional array to store a roll number and marks of the …

Member Avatar for Agni
0
130
Member Avatar for rash89

hi guyz.i've been working for this assignment in linked list for almost a week now..im complete making the program but i still have problem in deleting elements..in my program when i enter 1,2,3,4 and i want to delete 2..it deletes the 4 not the 2:?: ..how will i solve this?..pls …

Member Avatar for Passmark
0
93
Member Avatar for RohitSahni
Member Avatar for someguy88

Hello I apologise if im posting in the wrong place at all im fairly new to your forums and i was wondering if someone could help me with this bit of code im writing. Its supposed to roll 4 random d6 dice and then minus the smallest roll and print …

Member Avatar for Passmark
0
76
Member Avatar for newbietoC++

I have an assignment in my Advanced C++ class using Visual C++. I have most of it but there is a problem. After each pass it is supposed to display the results. I can get it to display the unsorted list, display the sorted list but not after each pass. …

Member Avatar for Ancient Dragon
0
96
Member Avatar for nivea_jmd

hi i wanted to know how to read the status of RTS/CTS line using ioctl calls....i am programming using c/c++ and linux if someone can post a code snippet or suggest a book for the same...it will be very helpful.... 2. also i will like to know can a windows …

Member Avatar for Passmark
0
150
Member Avatar for olams

Hello, I wrote a code to calculate the fibonacci number. However, i noticed that it starts acting erratic when i input 1000 i.e it cannot calculate the 1000th fibonacci number. I would appreciate it if you could show me how to make it work. [code] int f(int &n) { if …

Member Avatar for ShawnCplus
0
81
Member Avatar for jarhead741

i'm trying to write a quicksort but my partition is not working properly can some help me please [code=c++] void parttition(int myArray[],int first, int last); void quicksort(int myArray[],int first, int last); void quick( int size) { int myArray[10]; int x; srand((unsigned)time(0)); for (x=0;x<size;x++) { int random_integer = rand()/25; myArray[x]=random_integer; printf("%d\n",myArray[x]); …

Member Avatar for Passmark
0
94
Member Avatar for olams

Hello, Please i really need your help. I am trying writing a code that will delete the last element of the list. However, i keep getting 0 or when i tweak it, i get a message asking me to abort what i am doing. In this code, i append some …

Member Avatar for olams
0
143
Member Avatar for conan19870619
Member Avatar for shankhs

I am a newbie to windows programming environment in c++,I have to make an on-screen keyboard. I dont know how to do draw the exact layout of keyboard in Visual C++. Any help?

Member Avatar for VernonDozier
0
106
Member Avatar for tonyaim83

Hi... My input file is as follows :- A<-B<-C<-D A<-C<-E<-F<-P ....... ..... What i want is to first store the given input as follows :- {{{A,B},{B,C},{C,D}},{{A,C},{C,E},{E,F},{F,P}}} and then make a check if the pair is present in particular subset of a set. For e.g if the user can give index …

Member Avatar for VernonDozier
0
73
Member Avatar for abhi_elementx

This may be a dumb question. But is it possible to use multiple files in a single program without using header files concept. Perhaps maybe using the "extern" keyword.

Member Avatar for abhi_elementx
0
95
Member Avatar for vanalex

Hello everybody! This forum gave the greatest impression so congratulations to you folks who built it. I'm not an expert in c++, i've actually started learning a year ago so i need little help..I have two classes course and student. The course class is : [CODE=c++]class course { private : …

Member Avatar for rkavinash
0
109
Member Avatar for sweety0

hi all this is an algo of finding the no. of times the key occurs in an array.. [code=c++] #include<iostream> using namespace std; int main() { int a[5]={1,2,2,5,6}; int max=2; int counter=0; for(int i=0;i<5;i++) { if(max==a[i]) counter++; } cout<<"the element "<<max<<" appears "<<counter <<" no. of times"; return 0; } …

Member Avatar for sweety0
0
94
Member Avatar for kmaria

i have a window with 2 edit boxes. i want when i put value to the first edit box to start the counter and when i click on the second edit box to stop the timer. thank you and sorry for my english.

Member Avatar for Ancient Dragon
0
103
Member Avatar for seneye

I want to learn to C++ But I don't know how to start to learn it? Is there a program that I can practice it in or something? I just don't even know how to begin learning it?

Member Avatar for HLA91
0
128
Member Avatar for volscolts16

Well another semester has started almost done with all java classes, and now C++ has started. I like it so far it is shorter and somewhat easier code. I have a homework assignment which I have started on, but with just starting C++ not sure where to go. Class meets …

Member Avatar for brk235
0
98
Member Avatar for jimJohnson

I am new to C++ and need help with this output after the debugging.... Type of Ticket Orchestra Mezzanine Balcony Select: Number of Adults: Number of Children: This is what it is supposed to look like and I am confused on multiple issues. All i know is need to use …

Member Avatar for brk235
0
81
Member Avatar for jf404

I've been working on this code for a simulation, but strange things keep happening. The trader object is (int buy, int inf, int t1). The values of buy and inf should only be 0 or 1, but i keep getting ridiculously high and even negative values and I cant see …

Member Avatar for wazzam
0
114

The End.