51,592 Topics
![]() | |
okay, i usually create beg programs and they often compile. for some reason, this one is not compiling at all. i cant seem to figure out whats wrong. my objective is to prompt user to open a file named "data.txt" have HELLO WORLD printed in a scrambled version to a … ![]() | |
dear sir... i got a confusing of this... [code]ifstream is; Char c, temp_isi_file[100]; int i; is.open ("b.a"); memset(temp_isi_file,'\0',100); while (is.good()) // loop while extraction from file is possible { c = is.get(); if (is.good()) if (c==',') { //cout << temp_isi_file << ":" ; [COLOR="Red"]textBox1->Text = Convert::ToString(temp_isi_file);[/COLOR] i=0; c='\0'; memset(temp_isi_file,'\0',100); } … | |
Hello, I was trying to create a Coalesced hash table by self teaching myself using various sources. I fixed most of the errors, but when i compile on either my visual C++ compiler or Dev -C++ both saids there is a undefine linker reference for the hash members in my … | |
i am in beg c++ and my instructor is asking me to find "some other combination that also does not work! Your loop should prove something similar for values other than 10 cycles, steps of 0.1, and a sum of 1." i found 1 combination, which is in my program … | |
IT is defined in the back of my book but can't be found in my program. | |
Here is my function that reads in a list of integers and doubles the size of the array if there are too many inputs. The current size of the array is 10. [CODE=C++] int* read_list ( int *list, size_t *list_size_ptr, size_t *array_size ){ size_t index = 0; int *new_list; while … | |
Hello, I'm new here in DaniWeb, and this is my first post, but i'm learning [I]C++[/I] and before this i was reading some tutorials in the internet of the [URL="http://www.adobe.com/br/products/air/"][I]Adobe AIR[/I][/URL] development, but if Adobe AIR is so much easy to learn and [I]C++[/I] is a very flexible and good … | |
console.cpp: [CODE="c++"] #include <iostream> #include <string> #include <vector> using namespace std; template <typename T> T #ifndef _DEBUG & #endif val(const T& x); class A { private: public: void f(); }; void A::f() { val(1);// deleting val solves the problem } int main() { new A; cin.get(); } [/CODE] general.cpp: [CODE="c++"] … | |
Hello. I am quite new to c++ but am working on translating a prime generator I have made over from c#. I have everything working well but have found that c# can output to file faster than c++ (by around 10%). This is once the 'working out' is done. Here … | |
I've been programming in C++ for 20 years and finally got the size of my mains down. I've been programming in C++/CLI for about 20 days, and I'm back to my old buggy-boo, uncontrolled file size. In this case it is the Form1.h file. It has about 20 controls using … | |
Hi, I have developed a lot console applications in C++ using Visual Studio Express and I am curious how much effort it would be to wrap them with a ultra simple GUI? Do I have to purchase MFC or code hunded of pages in order to accomplish this in C++ … | |
Alright, I'm down to the nitty gritty absolute end of a fully functional hangman game. There is just one part where I am absolutely stuck. When you get a wrong guess, the game successfully draws the gallows. I have no issues with wrong guesses. It's the right guesses that has … | |
Okay so, It's my first time on C++. They say you can use C++ to make games, so I want to learn about C++. (remember I'm a big newbie) So my question is, how does C++ work? Like if you put the C++ code in notepad, save it, open it, … | |
i have to make a program to find the intersection of two strings, i have made program but its not working. any help will be appreciated.:) [code] #include <cstdlib> #include <iostream> using namespace std; void intersection(char *str1, char *str2) { int len1,len2,i=0,j,flag=0; char temp[30]; while(*str1!='\0') //outer loop for 1st string. … | |
ITS ALL THE WAY AT THE BOTTOM OF MY IMPLEMENTATION FILE. MAIN [code] #include <iostream> #include <fstream> #include "line_test.h" using namespace std; int main() { //open up file to be read string input; ifstream in; cout<<"enter file name which needs to be opened\n"; cin>>input; in.open(input.c_str()); while(!in) { in.close(); cout<<"the input … | |
please download the VC++ express 2008 project attached. it has linker errors. please help me solve the problem. | |
Hi guys, I am in great trouble. I want a c++ project within 1 week!!!! But my teacher wants the topic name tomorrow ! pls help me give me some project ideas project should be simple&is in c++ language graphics are not allowed it can be management projects:sad: | |
Hi ancient dragon. i need to extract specific words from 2 different point (directors and writers in a text file), like delimiters example of the text file below: i want [B]alex proyas[/B] to be extracted. words........ [B]DIRECTOR:[/B] alex proyas [B]Writers[/B]:...... this case is quite similar to the one above, but.... … | |
![]() | Getting an access violation error when I get to the array sort code... Here's the code. Any thoughts? [code] // sort the shape arrays by area for(int i = 0; i < total - 1; i++) { for (int j = i; j < total; j++) //start at i { … |
![]() | I am working on an assignment that basically requires a class INT that operates similar to the int standard class... Below is my code. All seems to be working, with the exception of handling this line: INT x,y = 6; should assign 6 to x and y. Assigns only to … ![]() |
So on my last post, I asked about how to make C++ codes to work. This time I want to ask. How should I get started? Where should I get started to learn C++. Or what should I learn before I learn C++? Everything please XD. Oh and, I'm 12 … ![]() | |
Well technically I don't know how to make it quit. I am very new to programming. I wrote my first program three weeks ago and I must say it is a wonderful mix of highs and lows, especially when your code compiles. Anyway, I have been trying to figure out … ![]() | |
hi all, i've written a program, n almost works, it just gives me this errors and dont know how to solve them :$ thanks for the help in advanced :D [code=cplusplus] 1>Compiling... 1>VersionFinalTpProg1.cpp 1>e:\esba\2cuat\programacion1\tpfinalaentregar\versionfinaltpprog1\versionfinaltpprog1\versionfinaltpprog1.cpp(199) : error C2676: binary '[' : 'art' does not define this operator or a conversion to … | |
Hi My program is rather simple, or I thought it would be rather simple :P My program reads a text file & saves each line of text into an array called buffer. [B]The problem is[/B]; each line of text is not in a separate array, the whole text file is … ![]() | |
Hi I'm trying to write a heap data structure but I have no idea how to do this.Could Someone help? thanks | |
Hello guys, Is it possible to build an application for authenitcating on a domain, without actually providing the password? For example gesture recognition. I have read on msdn and they were talking about building a "custom authentification package" but this package calls MSV1_0 package afterwards. I am interested in a … | |
why do i get undefined reference to error in my main with regards to isvalidname. It says undefined reference to... in my isvalidname i check if they enter in first name, char ws and then last name. Then i want to print out everything that i have deleted on that … | |
Hello, Im programming an image reader and I need to print out a histogram that shows how many times a given pixel value is present in a image - actually it doesn't have to be the graph, just a table with two columns would be enough i have written a … | |
[code=splusplus]#include<iostream> #include<iomanip> using namespace std; int main() { int a[10][10],b[10][10],c[10][10],i,j,k,r1,r2,c1,c2; cout<<"Enter the order of I matrix\n"; cin>>r1>>c1; cout<<"Enter the order of II matrix\n"; cin>>r2>>c2; cout<<"Enter the "<<r1*c1<<" elements for I matrix \n"; for(i=0;i<r1;++i) for(j=0;j<c1;++j) cin>>a[i][j]; cout<<"Enter the "<<r2*c2<<" elements for II matrix \n"; for(i=0;i<r2;++i) for(j=0;j<c2;++j) cin>>b[i][j]; for(i=0;i<r1;++i) for(j=0;j<c2;++j) { c[i][j]=0; … | |
I'm practing with Akrip32.dll for a time now and I can get the DLL version as DWORD. The Version is divided as HIWORD and LOWORD Can anyone help me interpret these Buzzwords? I have no Idea of what they are | |
Hi All, I Think I am close. I am trying to write a small user function that gives "roundCalc" to the main as a rounded number UP to the nearest 1000. (If 1011 should round up to 2000). I have "calcTotStat" reading in, and I thought I had it right, … | |
Okay, so I'm completly new to programming, and I've been using Sams Teach Yourself C++ in one hour a day over the last two days, admittingly taking in more than a days worth per day, though. This morning I decided I was bored of reading theory, and decided to get … | |
Hi All, I'm having trouble with my code. When I compile I get Undefined reference to class::method where by class and method are my class and method. I get my methods from akrip32.dll I,m at work so I have no source files, but I will attach them later when I … | |
I have to drop the lowest score, and i can't include it in the calculation of the average. for input validation cant accept negative numbers for test score. #include <iostream> #include <iomanip> using namespace std; void arrSelectSort(float *, int); void showArrPtr(float *, int); void showAverage(float, int); int main() { float … | |
Hello,i am writing an application which involves invoking multiple threads to pick data from a queue and then delete or pop the retrieved data.My codes work well for this purpose but then my application suddenly crashes with a dialog with the following error message: Debug assertion failed! Program:.... Expression:_BLOCK_TYPE_IS_VALID(pHead->nBlockUse) ------------------------------------------------------------------------------ … | |
[CODE]struct boardType { int boardNumber[8][7][7]; int numberOfBoards; }; //note: int main() is assumed as standard "bloodshed DEV-C++" compiler boardType totalBoards; totalBoards.numberOfBoards = 8; totalBoards.boardNumber[0] = {{0,0,0,0,0,0,0}, {6,6,6,1,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {5,5,5,5,5,5,5}};[/CODE][QUOTE]expected primary-expression before '{' token expected ';' before '{' token[/QUOTE] Above shows the script I am trying to make … | |
hi i am from bangladesh and read in ruet.i want to convert two dimensional array into one dimensional array.pls help me | |
hello, i defined t_wbrowser with the Webrowser Class. After i navigated to the Website i want to Copy the text the user selected on the Page. I have no idea how to do this, i googled and there was something with ActiveX but is there an easy way? [code] String^ … | |
Hey all, need abit of help bringing a .exe window which has been previously open in my program.On a button click the program window should be brought to the front with "Alt+S" to be pressed. I am using MSVC 6 MFC and my code looks like: [ICODE]void CEvolveTraffic::OnButton() { // … | |
struct A { virtual A* f() { return this; } }; struct B: virtual A { B* f() { return this; } }; The GNU compiler gives an error: sorry, unimplemented: adjusting pointers for covariant returns What is the problem? | |
alright, so I recently obtained a reference implementation of MD5. I benchmarked it, and it ran about 30% faster than OpenSSL's MD5. The function call is as such: [CODE]fast_MD5(unsigned char *pData, int len, unsigned char *pDigest);[/CODE] it worked great for a simple MD5 hash cracker, but I had trouble tweaking … | |
Hello,, I'v had some problem,,, when i read a file,using visual C++ 2005. example: a.txt 111,222,333, 444,555,666 with this code : StreamReader^ din = File::OpenText(fileName); String^ str; int count = 0; while ((str = din->ReadLine()) != nullptr) { count++; Console::WriteLine("line {0}: {1}", count, str ); } How can I, convert … | |
Hi. I'm new to c# and have ran into a problem, I am using the following code to generate textboxes within a panel. [code] private void button1_Click(object sender, EventArgs e) { AddFields(); } private void AddFields() { if (textBoxIndex != 10) { TextBox field = new TextBox(); field.Name = "field" … | |
Hey guys! I'm requesting constructive criticism on the code that I've written so that I might get a better idea of how to strengthen my code while keeping it short and sweet, or even just pointing out unnecessary things or things that I should have added. My assignment was: [quote]Write … | |
hello all, i'm a biology student currently taking programming in uni, and i have a homework question to solve. i have to write a programme to create and print a one-month calendar which can be used as month and year calendars as well. the programme should be able to; 1. … | |
Hey, I download DarkGDK for Visual C++ 2008 Express (also downloading the correct version of the Direct X SDK). I just saved the SDK in some random directory, so when I try to execute the test code, i get an error telling me d3dx9.h can't be found. So, where do … | |
Well I am writing a program for Windows Mobile phone, I need to read text files in the program, the character sets (charset) of the files I am going to read are unknown, here I need to convert whatever text(Actually I probably only need to handle UTF-8, UTF-16 BE, GBK, … | |
Hi, I wonder if you could recommend a book that talks about methods for optimization (error function minimization) in conjunction with C++? In particular I am interested in methods for numerically minimizing a multi variable error function, e.g. f(x,y,z, ...). My applications are such that I know that gradient methods … | |
Hey all, I am trying to check if a .exe file is open, if it is open bring it to foreground, if it is not open open .exe file and bring to foreground. The code I have written doesnt seem to recognise if the program is open or not as … |
The End.