49,761 Topics
| |
Since i am a Ph.D student in material science, i have no previous experience in programming, and for 1 week now i am trying to write a simple program...where i can use some help from you. I have written a program that can read every line in a txt file … | |
The question is to write a function that dynamically allocates an array of integers. the function shoud accept an integer argument indicating the number of elements to allocate The function shoud return a pointer to the array Here is what i have so far, and it kinda works but at … | |
Hello How do I create an array when the size of the array is unknown? IE; the size of the array will depend on the contents of a file I am reading, so sometimes the array will end up being 10 sometimes 100. The way I have tried, is to … | |
[CODE]#include <iostream> #include <iomanip> using namespace std; int main() { string name; char indicator = 'c' ; // Input indicator char answer1,answer2,answer3,answer4,answer5; int count1,count2,count3,count4,count5; cout << " Welcome to Risk master, answer those 5 questions to calculate how risky your partner is"; cout << " Rule : press Y for … | |
Hi there, Im new to this forum so please bear with me. I need help in knowing how to copy an entire row in Excel using C++. Im not allowed to convert it to CSV format either. Ive researched and found a way how to open read Excel files using … | |
Hey guys! I was writing a program that had an infinite loop, [ICODE]while (1)[/ICODE], and within that loop was an if statement checking to see if a certain amount of time had passed. If it did, it would print out something, if it didn't, it would print out a [B]'.'[/B]. … | |
Hi. I'm programming in Borland C++ Builder v. 6.0. I'd like to know where could i get a Directory Dialog component. Thanks in advance. | |
I'm trying to create a 3D vector with dynamic vectors of char. I mean like this: 3dVect is only [U]one[/U] 3D vector 3dVect[0][0][12] 3dVect[0][1][5] 3dVect[1][0][6] 3dVect[1][1][9] 3dVect[1][2][8] ... this mean: 3dVect[0][][] consists of 2 2D vectors, and the 2D vectors have different sizes. I have read the thred [URL="http://www.daniweb.com/forums/thread136351.html"]http://www.daniweb.com/forums/thread136351.html[/URL] and … | |
I am working on a ftp client program and i wana know how to save password without creating a text file. If its possible to achieve this using xml or any other method please show me how. If u have a project or sourcecode on this please upload it in … | |
please can you help me to translate this code from c to c++ /*************************************************************** Program describtion : ===================== This program is for creating a Lexical Analyzer in c Created by : ============= CoMPuTeRQ8 kuwait university Major : COMPuTeR-SCIeNCe *****************************************************************/ /**************************************************************** Necessary Header files used in program. *****************************************************************/ [code=c] #include<stdio.h> #include<string.h> … | |
I am trying to customize my sorting of a LIST using a compare_function, but for some odd reason it keeps giving me the following error: error C2064: term does not evaluate to a function taking 2 arguments Specifically, I have list created within class B which needs to be sorted, … | |
Hi How to get local disk ( c:\ or d:\ ) used space in windows. Any API ? | |
[code=c++]int** a = new int*[col]; // works int** b = new int[][col]; //error cannot convert from 'int (*)[1]' to 'int ** int* c[] = new int[][col]; /error cannot convert from 'int (*)[1]' to 'int *[]' [/code] The first one works, but i get these errors when i use the other … | |
I wish to collaborate with someone who can write a program that would sort a large array [15x15] based on criteria other than alphabetical or numerical order. I am very new to C++. | |
Hi, I have implemented my first C++ class as following thanks to the generous help of Ancient Dragon: [CODE] typedef unsigned long ULONG; class CMatrix { public: CMatrix(const CMatrix& m); CMatrix(size_t row, size_t col); ULONG sum(); size_t s_row(); size_t s_col(); CMatrix& operator *= (const CMatrix& m); private: size_t _s_row; size_t … | |
Now i have an array, P[8]={0,1,1,2,0,3,1,0} And i want to add 4 separate values to each element in the array,so if i was to lookup P[2] i can access its 4 values. I tried doing it by giving those standard values an array of itself and making each value get … | |
Hi, i completed my coding which was related to searching files with .cap extension and then making out folders with a number contained in the file and then putting the files in their respective folders. now when i checked it ,it worked fine and created folders and sorted about 1.5GB … | |
can anyone help me create a typing game of falling letters(randomly), and as the player presses the key of the falling letter, the letter pressed will vanish and the player will gain points...thanks...help me,please... | |
Hey all, I am having some trouble trying to open a dialog window. Firstly I am using MFC in MSVC 6. I have a main dialog window and I am trying to open a second dialog window by clicking on a button("second") in the main dialog window. When I am … | |
I am using gcc on Suse Linux Enterprise Server 10 to compile my C++ source files. The problem I have is that when I invoke the command [INDENT][B]g++ source_file.cpp[/B][/INDENT] the file source_file.cpp is compiled as a C source file. I realized the problem when I was trying to set up … | |
My application in C + + uses winsock2.h It use the send method to send the frames to the server developend on java. My application send a string so: #define MAXLONGITUD 10000 char bufEnviados[MAXLONGITUD + 1]; bufEnviados[0] = (0xff & (longitud >> 8)); bufEnviados[1] = (0xff & longitud); send(sock, bufEnviados,strlen(bufEnviados), … | |
Hi all C++ expert, I'm new in this field. I've written a program but I need to write it using class. I'm not able to understand where I'll define [quote]a = new double[numElement];[/quote] etc.... and [quote]delete [] a;[/quote] etc... I'm confused where and why I'll define 'new' & 'delete' using … | |
Hi, I am now working with MFC and I have a main window, but I want to create a button, and when clicked, a new window to apppear, and also I want to draw in the new window. I created the button, and when cilcked is drawing a rectangle..it was … | |
Hey Guys/Girls I'm creating a C++ application. So far I have created 2 projects, under one solution. The first is a native win32 project and the other is a DLL. Now my problem. How do I include this DLL I create, in my win32 application? So far I have tried: … | |
Was recently asked to convert some code, but I have a minimalistic ammount of knowledge of delphi and I wasn't able to convert this code. If you could help me out it would be great. [code=c++] void TypeStr(char *lpszString) { char cChar; while((cChar=*lpszString++)) // loops through chars { short vk=VkKeyScan(cChar); … | |
Can someone please tell me how I would wrap my array. Lets say that it is of size 10. What I want it to do is count the number of letters in the name then mod it into the array (This is working properly). If a name has the same … | |
Hi all, I'm using microsoft visual C++ 6.0 with SP4 and SP5.. I had a program which content a CScrollView.. Now I would like to add in a image into CScrollView.. but my image is buffer..not from resource.. I can save my image, bitmap form, into local drive.. but I … | |
hihi, when I open a file using ofstream or fopen, the memory cannot be released after I call [B]close() [/B]function. how can I release the memory? P.S. the memory can be released after remove the files. the program code: [CODE] int main (int argc, char **argv){ ofstream file1; while (true){ … | |
wow, haven't been here for sometimes due to the business aspect of my course. would like some help in understanding what is set, get, change and return in c++. have an assignment with topics the class haven't covered as yet, but I'd love to understand it before we reach those … |
The End.