49,757 Topics

Member Avatar for
Member Avatar for mimita

Hello, I'm really a beginner in programming, and i might need you're help. I have an array[position][3] with fixed coloumns Position is from 0 to 99 an it looks like this: array [position][0] = helpFlow; array [position][1] = i; //i=rows of a [10[10]-grid array [position][2] = j; //j=column of a …

Member Avatar for kbshibukumar
1
97
Member Avatar for phillipdaw

The code was written for fun, and it is by far the most complicated program I've written yet. It's also my first step from C into C++. I have some training in algorithms but almost none in coding. It is pretty long and I don't expect anyone to analyze the …

Member Avatar for siddhant3s
0
102
Member Avatar for bhavya_talluri

hi plz help me i am getting the above error here i am attaching the program #include<iostream.h> #include<stdio.h> #include<conio.h> #include<math.h> using namespace std; int main() { int a[10],t,n,pos; clrscr(); //Sorting the elements in the array. Sorting technique name is “Bubble Sort” cout<<"Enter Elements into the Array"; for(int i=0;i<10;i++) cin>>a; for( …

Member Avatar for siddhant3s
0
411
Member Avatar for cppnewb

Hi. I'm making a class in an include file. I ran into some touble...When i try to compile, this is what comes up: [CODE] c:\...\renew.h(25) : error C2660: 'localtime_s' : function does not take 1 arguments c:\...\renew.h(36) : error C2660: 'asctime_s' : function does not take 1 arguments [/CODE] Here …

Member Avatar for cppnewb
0
1K
Member Avatar for jitendra.theta

hello, in the following question c=4; d= (++c)++; //It works in gcc compiler d= (c++)++; //it didn't work what i have read that ++c or c++ returns a value which can't be again incremented or decremented (like 5++). i want to know how the first statement works and second statement …

Member Avatar for siddhant3s
0
105
Member Avatar for MentallyIll5150

I am constructing a class "dequeint" of integers and using circular queue storage. I get my code to compile but its output is garbage? Please HELP! .h [code] #include <iostream.h> #include <stdlib.h> const int MAXSIZE = 10; typedef int NodeType; class dequeint { private: NodeType NodeArray[MAXSIZE]; int headi; //head in …

Member Avatar for MentallyIll5150
0
161
Member Avatar for Fouly

Hi, I'm trying to pass parameters to an exe file using C++...i tried the following code: [code] system("FileName.exe"); [/code] but this command line just fire the .exe file without passing any arguments... Thanks, Mostafa Fouly

Member Avatar for siddhant3s
0
568
Member Avatar for arpeggio54

I have this Instance of class A, which i first assign, then assign again, but the compiler calls the destructor AFTER they class has been constructed the second time, why? [code] class A{ public: int *Int; A(int b) { Int = new int(b); cout << "CONSTRUCTOR " <<endl; }; ~A() …

Member Avatar for siddhant3s
0
120
Member Avatar for mvmalderen

I'm fairly new to C++ programming and I would like to ask you a (maybe strange) question... The code below compiles correctly with both: - the latest MinGW-compiler - Borland C++ Builder Compiler 5.5 (from the free Command Line tools) However if I run the program (after compiling with the …

Member Avatar for mvmalderen
0
366
Member Avatar for Lotus_2011

I made program take number from user then display the factorial of this number >>>> The program works well but if I enter 20 it crashes. I need help how to accept big number in my program ?????? This my program [CODE]#include<iostream> using namespace std ; long long Fact(long long …

Member Avatar for siddhant3s
0
108
Member Avatar for di mo

Hey i have a code where i want to add/subtracrt 2 big integer. But i don't know how to do the carry thing. Does anybody has an idea? Here is my Code: [code=c] #include <iostream.h> #include <string.h> #define SIZE 40 class Huge { public: Huge(); void menu(); void rules(); void …

Member Avatar for di mo
0
449
Member Avatar for teddycow

Hey. I'm currently working on a project where I'm suppose to read album titles including song names from a file into a 2d array. When I input the cd number, only that record should show up in the console. E.g. Cd number: 1 Album title Song 1 Song 2 Song …

Member Avatar for teddycow
0
117
Member Avatar for arpitha_ks

hi, I am trying to declare a 2D array in a member function in C++ , where its size changes everytime i run the program. but it is giving error like " a constant expression is required " but i cannot make the size constant, as i need to change …

Member Avatar for siddhant3s
0
84
Member Avatar for nagha3

Hey everyone, My problem is that I have a program which is to be used for teachers. One of the functions I am implementing is a SearchStudent function. Basically it checks a multidimensional array I created called MyClass[MaxSize,MaxGrade], MaxSize being the amount of students that can input into the program …

Member Avatar for Ancient Dragon
0
104
Member Avatar for Tyrick

Say I had a program running... like I was in the middle of entering 100 numbers into an array... is there a way I could program it so that one the user hits a key, say "cntrl-A", that the process will stop? Additionally, I was reading these lecture notes and …

Member Avatar for vmanes
0
85
Member Avatar for DemonGal711

Ok, it's a little weird, but I'm basically trying to write a piece of code that would determine how many letters are different between two words, like cat and cot are off by one yet cat and dog are off by three. So, I have a vector that contains all …

Member Avatar for DemonGal711
0
101
Member Avatar for bugmenot

Please correct the error in my program. When i run the program on turbo c++ 3, it output 3 times. Also When i enter more than 1 entry only the last entry is outputted. Also it is outputted 3 times. [CODE]#include<fstream.h> #include<iostream.h> #include<conio.h> class student { int rollno; char name[20]; …

Member Avatar for r.stiltskin
0
182
Member Avatar for BruenorBH

I am trying to create a thread to continually update the time in the textbox. The issue is how do you reference a textbox in that was created in the main section of the program? main.cpp [code=c++] #include <windows.h> #include <ctime> #include "resource.h" static bool keepRunning = true; static HANDLE …

Member Avatar for BruenorBH
0
145
Member Avatar for bugmenot

I have a very similar assignment in which we have been specified that we are NOT allowed to use vectors. Is there any other way in this case to count the number of lines of data within a text file??

Member Avatar for Ancient Dragon
0
133
Member Avatar for christiangirl

Hello, I am getting 8 8 8 7 7 8 6 7 8 9 as output when I enter 1 2 3 4 5 6 7 8 9 0 into this program. It is supposed to sort the numbers one through 10. I debugged it, and believe the problem is …

0
79
Member Avatar for jamboadams

hey anyone know what the largest value that can be stored in an integer variable is? likewise is there a double / long type of deal that isnt of float type? thanks

Member Avatar for vmanes
0
1K
Member Avatar for daviddoria

I want to do something like this [code] template <class T> vector<T> DereferenceVector(vector<T*> &PointerVec) { vector<T> ObjectVec; for(unsigned int i = 0; i < PointerVec.size(); i++) ObjectVec.push_back(*PointerVec[i]); return ObjectVec; } [/code] and call it with [code] void TestDereferenceVector() { vector<double*> a(10); vector<double> b = DereferenceVector(a); } [/code] That seems to …

Member Avatar for daviddoria
0
106
Member Avatar for BattlingMaxo

I am developing an aquarium in C++ the fish will move by algorithms only, no keyframing. here is my question: exporting the fish model from Blender ( a 3d modelingpackage) that it could be imported into my program with all the bone structure and vertex weight information included. is that …

0
59
Member Avatar for MyRedz

here's my question here Construct a class named Coord that contain two floating –point data member named xval and yval , which will be used to store the x and y values of a point in rectangular coordinates. The function member should include appropriate constructor and display functions and friend …

Member Avatar for siddhant3s
0
132
Member Avatar for greg022549

I am just learning how to use C++ and I am anxious to do so.. I need help with working with double selection if statements. Here is what I am trying to accomplish with in my program: If a client selects to travel to Japan he is charged a flat …

Member Avatar for vmanes
0
87
Member Avatar for urbandad70

I am working on another thread, but I encountered a problem just testing importing into an array. I use this code and it just hangs. I am stuck, please help. FYI, the scores.txt is in the same location as the source code. [code] #include <fstream> #include <iostream> #include <cstdlib> #include …

Member Avatar for jencas
0
140
Member Avatar for ronicasingh

Hi all professionals, I am just an amateur compared to most of you. I am contemplating starting an extremely lengthy program, just for my own purpose, which basically does a holiday reservation to whichever and whatever place in SA, for now. I am just thinking this idea for building up …

Member Avatar for jencas
0
101
Member Avatar for acardiac

I have written this program and i am facing problems in the SearchRec() and DelRec() function.....SearchRec() function is supposed to search for a record on the basis of the pptno provided and if found would return 1 else it would return 0(but it is no working).And the DelRec() function should …

Member Avatar for Ancient Dragon
0
235
Member Avatar for Dendei

hi i got an problem about reading my files i want to decide which file to open in the program not before anyone now a solution? :) [CODE] string fil; cout<<"which file? : "; cin>>fil; ifstream myfile(fil); [/CODE] cant see why this dont work...

Member Avatar for Dendei
0
96
Member Avatar for meistrizy

Thanks in advance for your help. I am supposed to create a program that allows user input for a code. The program will then read the array and output the letter on the keyboard one character to the left of the inputted strings. I am first trying to get the …

Member Avatar for meistrizy
0
163

The End.