49,761 Topics
| |
I'm porting a program that used stdio file facilities to use an std::ofstream instead. The original program uses fsync to force a file's buffers out to the disk. The fsync() is used because I'm writing a logging file, and want to ensure that data is written ASAP (i.e., before a … | |
Is there a utility which you load with a .txt file which is a list of files and directories you made previously, so it generates, sort-of, a virtual directory tree (explorer-like, with icons and all)? _______________________________ For example: You have a list, a .txt file, which has this text in … | |
Hi everyone, I've been having a little trouble with an assignment I've been given and I'm looking for a little help. The assignment requires me to read in a line of text from the user, and then use Parallel Arrays (both iteratively & recursively), An Array of Object (iteratively, recursively, … | |
Do you do the flow chart first or go straight to the code? I find it easier to do the code first for some reason, maybe this is bad? | |
Hi, iam new to MFC programming and i was just wondering if someone could help me. Iam after creating two resources called menu and dialog. After creating then i ran into problems. I wanted to be able to click on the menu command that will then display the dialog box, … | |
Hello, How to call a function which takes dynamic array argument? That is to say, if I have: [code=C++] void fctn (int *a[], int n) { *a = &n; //do stuff with a. } [/code] How to call this in main? Must I have another array declared in main to … | |
Hi I am trying to generated a Huff man code. i am trying to arrange a vector<info> (info is a structure) to get a binary tree. 0. Read a txt file containing about 10 to 20 different symbols.and store it in a vector (vector <info>); 1. First sort the vector … | |
Well what do you think about my round-robin scheduling tournament? Is it good n complete? [url]http://rapidshare.com/files/19116739...edule.exe.html[/url] | |
Id like to use lapack to invert large martix but i am lost . i don't know even how to install it and call it in a program. i have searched for a month in the web but always the method does'nt work or complicated . can someone do something … | |
hey guys please help me out here.i really liked to know how to convert hexadecimal to binary | |
Hello I need to create a table (using multidimensional array/vector) that contains datas in a spiral form. Here's my work so far: [code=C++]int current_char = 0, rows = 3, columns = 4; string input = "abcdefghijkl"; vector< vector<string> > str_table(rows, vector<string>(columns)); for(int i = 0; i < (int)input.length(); i++) { … | |
In the following code: [code] for(int i = 0; i < argc; i++) cout << (i > 0 ? " " : "") << argv << (i < argc - 1 ? " \\" : "") << endl; [/code] I try to use "next" to step over, but always step … | |
I need to build the mainscreen with muti choices . The use can enter the number related to the choice and get into it . Can anyone feed me back with some hints to start please . void mainscreen() { cout<< 't\t ---------------------------'<<endl; cout<<' \n Course Evaluation'<<endl; cout<< 't\t-----------------------------'<<endl; | |
Hi everyone, I am having trouble with a function that mergesorts a generic array (using void *); it seems that I can't swap two elements in it Here is the code [code=C++] void mysort( int n, // Number of elements int elementSize, // Size of each element void * array, … | |
i'm doing a game for my c++ course and there is something wrong with a class the error comes up in class hero...function jumpright [code=cplusplus] #include <iostream.h> #include <conio.h> #include <afx.h> #define rows 48 #define cols 80 class screen { private: char x[rows][cols]; public: screen() { int i,j; for(i=0;i<rows;i++) { … | |
hi, i've an insertion sort algorithm and a selection sort algorithm. i'm not sure how to measure the performace(best case and worst case in terms of N= size of the list, deque, vector etc.) i'm trying to insert comparecount and movecount in the program. Bubble sort was easy but im … | |
Hi , I'm using oracle 10g and vc++ 8 .Net 2005. Can anyone help me out in loading oraocci10.dll dynamically. when applcation run that time "This application has failed to start because oraocci10.dll was not found. Re-installing the application may fix this problem." popup display. I also copy oraocci10.dll ,oci.dll,oraocci10.lib,oci.lib … | |
I have made a program that stores a file like this: [code] ofstream out; out.open("C:\\reg.txt"); [/code] This file is used everytime a program starts in order to find if the encrypted password is correct within this file. This works without any problem on my computer, using XP Proffessional and where … | |
I have developed an application in Visual C++ 2008 Express Edition. In order to run a program on your computer you will need the Microsoft .NET Framework 3.5 installed on your computer from this link: [url]http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en[/url] Now if I will distribute my program and make a setup.exe file for this … | |
within a windows forms class (form1) I declared a cliext vector of vectors of strings with [CODE]cliext::vector<cliext::vector<String^>^> myvector;[/CODE]. Then, within a function in that same class I tried to push back a vector of strings in myvector but it resulted in an error. I attempted to push back the vector … | |
Hello all, I just started using c++ and I'm supposed to write a function that takes two positive integers, p and q, where p<q, and i have to return the sum of all the numbers >=p and <=q which are divisible by 7. here's what i have so far: # … | |
Overview: Compare average monthly temperatures to the temperature collect for the year specified. Store in a text file for each month whether there is a warming, cooling, or normal trend. A warming trend is apparent if the year being analyzed is three times the standard deviation above the average temperature. … | |
How it is useful to create a static variable in a non static member function? The compiler allows that, and i wonder in what situations it is useful to create static variables in the function bodies as they are going to be disposed at the end of the function call. | |
Is there anyway to get the calling function? ie [code] void A() { if (A() was called from B() ) do something; else do something else } [/code] Is this possible? Dave | |
(Using MS Visual Basic 2008) Hi I have Created this program so far for a uni assignement, how ever i need to be able to total the arrays so i can display correct total overall, however the array size has to be defined by the user therefore the size of … | |
Hi, I am in problem. I have written some code in VC++.NET 2008. It is using third part AMT SDK. It is using file handling of C using fopen() function. The file are opened in binary mode (rb). It is working very perfect according to our requirment on my local … | |
Hi, I have some basic code: cout << "HOW MANY BOTTLES IN THE BASKET? "; cin >>bottles; I want to put an if statement to make sure that no letters are entered and only numbers are? How would i do this? Thanks guys! | |
I have setup a class that stores the data for my database connections. Inside the class I have several members that either set or get the variables. Inside my main I have set the value of the hostname. Now I have a second class that I am testing with called … | |
Hi All, I am new to programming world, i wanted to make a script which will create folder when counting of files breaks. for Example- 1) I have 1000 no of jpg files in a single folder.(but ) 2) but these files has a number break in between. (like it … | |
Hello, I am trying to figure out why pointer address is not preserved over a function call and how to fix it. For example: [code] void test_function(char **,char *); int main() { char **argv = calloc(64,sizeof(char *)); char *line = "MAMMAJAMMA!"; test_function(argv,line); printf("argv[0] == %s",argv[0]); return 0; } void test_function(char … |
The End.