49,761 Topics
| |
Hey all, I'm new to C++ and struggling to write a program. I am used to writing in VBA and Mathlab but because I need to run a long run simulation have to rewrite my program in C++. What a am trying to do is if I have a list … | |
Hey all, I'm new to C++, much more at home with mathlab or VBA so this is probably a simple problem for you guys. I am writing a program and I want to change values at the end of loop but keep answers from previous loop, i.e. in other programs … | |
The following is a code that my teacher gave me .. I dont know the working of files in c++ :( this program is supposed to copy a datafile into another.. but its is not working ... many many errors.. fname1 and fname2 are already existing files,right? or fname2 is … | |
hi all im tryting to create a wrapper dll for my java program which must decompress data using gzip.dll decompress algorithms.well its the same as c++ calling a dll thread posted my myself.using the help of user kbw i have made great progress.well but still i m not able to … | |
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 … | |
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 … | |
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( … | |
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 … | |
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 … | |
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 … | |
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 | |
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() … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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]; … | |
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 … | |
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?? | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.