- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 32
- Posts with Upvotes
- 26
- Upvoting Members
- 7
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Datta, Dayadhvam, Damyata
non quasi imperans dico sed per aliorum sollicitudinem etiam vestrae caritatis ingenitum bonum conprobans
Re: [code] // Windows Programming Tutorial Series #include "stdafx.h" #include <windows.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox (NULL, "Hello World! This is my first WIN32 program", "Lesson 1", MB_OK); return 0; }[/code] 2 errors: Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/a.exe : … | |
Re: Hello, I've had some problems converting a string into a char. I've tried many, many things, but it didn't seem to work. I'll post the code below: [code] char filename[1024]; char* url; string sUrl; HINTERNET hINet, hFile; hINet = InternetOpen("InetURL/1.0", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); if ( !hINet ) { … | |
Re: I have a treeview in my program for which I am adding a bitmap of an open and closed folders. I have included messageboxes to show where the program fails. It fails at the loadbitmap function. I appreciate it if anybody can tell me what is wrong. Below is the … | |
Re: You see, I am writing a program that uses strings for input to determine things, and I don't want it to be case sensitive. So, I know you can go through a string and go char by char to store each char, [inlinecode]tolower()[/inlinecode]'d into another string while in a for … | |
Re: I'm trying to read from a text file multiple times but I only seem to be able to read the data once. Any advice would be greatly appreciated. [code] string input; while (!ifile.eof()) { getline(ifile,input); cout << input << endl; } while (!ifile.eof()) { ifile.get(ch); cout << ch; } [/code] | |
Re: In visual c++ 2003 to visual c++ 2005 are there any major changes,Are there any Syntax changes i know there has to be,and would the 2005 version be worth the money? | |
Re: Hi, this is not a HUGE problem but I was jw why at the end off all my codes I have to type, system("pause");. When I even do the Hello World! program thing the black screen just flashes. I was jw why no one elses codes have this. Its not … | |
Re: Hi i am so lost and stressed please can some help me. My question is how do i code the follwoing • Constructor: Copy The copy constructor should check the validity of the Entry object parameter through the use of the isValid method and copy the valid objects media and … | |
Re: Hello, Can anyone tell me what the code beneath means. I've searched but can't find a clear explanation. Maybe someone can give an example of how to use it. Thanks... [code] [COLOR=#0000ff]bool[/COLOR][COLOR=#000000] MyClass::[/COLOR][COLOR=#0000ff]operator[/COLOR][COLOR=#000000]()()[/COLOR] [COLOR=#000000]{ [/COLOR] [COLOR=#000000] ....[/COLOR] [COLOR=#000000]}[/COLOR] [COLOR=#000000]class MyClass[/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=#0000ff]virtual[/COLOR] [COLOR=#0000ff]bool[/COLOR] [COLOR=#0000ff]operator[/COLOR]()(); } [/code] | |
Re: I use Bloodshed Dev-C++ version 4.9.9.2 and it is a little weird in that it accepts "and" as "&&" and "or" as "||", not to mention not requiring parentheses around separate clauses in and/or connected statements. Therefore it would read the following as the same. if(voice==loud or voice==annoying and voice==whiny){ … | |
Re: HI all, In my c++ program, I did the following. [code]...... class thr {private: char *d; ...... public: d =new char[35]; .... } destructor has the line delete [ ]d; i get segmentation error *** glibc detected *** /usr/bin/perl: free(): invalid next size (normal): 0x0000 000001bc7120 *** [/code] But if … | |
Re: So I'm working on a program where you fill in some textboxes and press a button to generate a .txt file with the texts in it... I'm working in Visual Studio Express (C++) The only thing i have so far is: [code] [COLOR=#0000ff]private[/COLOR][COLOR=#000000]: System::Void btnAdd_Click(System::Object^ sender, [/COLOR][COLOR=#000000]System::EventArgs^ e)[/COLOR] [COLOR=#000000]{[/COLOR] [COLOR=#0000ff]char[/COLOR][COLOR=#000000] … | |
Re: im trying to create a structure that contains an array of structures but i keep getting error when compiling the code (corrupt stack). just to make sure, is my struct code correct? [code] typedef struct status *StatusPointer; struct status { int item; }array[MAX_NUM]; typedef struct allStatus *AllStatusPointer; struct allStatus { … | |
Re: I am writing a simple program.. enter first and last name and a search is performed.. and their phone number (if found) is returned. I have used vector class iterators before a couple of times.. but devcpp does not seem to like this code.. and stops compilation somewhere inside of … | |
Re: I just start learning C++. I thought I can access an integer array by using pointer arithmetic method. why does the first program work but the second one does not??? [code] #include<iostream> using namespace std; int main() { int array [5], i, *p; for (i = 0; i < 5; … | |
Re: Hey guys im working on a a banking program for my cpsc class and i have the code finished and i just cant get it to run, i believe my brackets are wrong somewhere but i just cant figure out which ones so if someone could juss help me out … | |
Re: I'm trying to write program that evaluates a poker hand and returns whether or not it contains a straight, flush, pair, etc. I've got every method except one to work. I cannot figure out how to correctly write the method that determines whether or not there is a straight. Every … | |
Re: I can code things okay, but I have real trouble coming up with algorithims to solve problems. For instance this problem: 'A scientist uses rabbits (yes, another rabbit problem) in her experiments. She starts out with one pair(male,female). At the end of each month, a pair of rabbits produces one … | |
Re: I am trying to create a binary tree. Ultimately I would like a user to be able to insert how deep he or she wants the tree to be and then have my program be able to create the tree at that depth. Root = depth 1 and so on. … | |
Re: Ok, I have a small problem. I'm just trying to get my program to read a single line from a file at a time, and put the results in a vector. The problem is at the end of each vector. It repeats the last element twice and also adds a … | |
Re: any idea what i am doing wrong? [quote] Error 3 error LNK2001: unresolved external symbol "private: static float SavingsAccount::annualInterestRate" (?annualInterestRate@SavingsAccount@@0MA) Savings.obj [/quote] SavingsAccount.h [code] #ifndef SAVINGSACCOUNT1_H #define SAVINGSACCOUNT1_H using namespace std; class SavingsAccount { private: static float annualInterestRate; float savingsBalance; public: SavingsAccount() { annualInterestRate = 0.03; savingsBalance= 2000; } float … | |
Re: Howdy there all again. I have been working in C# for some time and think i am ready to graduate to a real language that can actually work hand in hand with memory managment :P so my first venture is to write a piece of software that will open a … | |
Re: I am trying to create a blackjack deck of cards (blackjack uses five decks... 5*52 = 260) Suit is irrelevant in blackjack. How do I create my deck? [CODE]#include <iostream> using namespace::std; int main() { char thedeck[13]={'2','3','4','5','6','7','8','9','0','J','Q','K','A'}; char deck[260]; for (int i=0;i<20;i++) { for (int j=0;j<13;j++) { thedeck[j]; } } … | |
Re: I have a 2 part problem. 1) In circleTypeImp.cpp I am being returned incorrect values for circum and area variables. I have tried using both float and double variable type with no luck. Any pointers? 2) I have read over how to derive a class a number of times and … | |
Re: Hello I'm newbie in C programming. Iwant to make a simple contact book that have add, delete, edit, and display function. 2 out of 4 i've done which is add and delete. So I need some help from all of you in edit and list function. Here is my function … | |
Re: I have a question about the map-question JoBe asked at the start of this post. I'm also trying to build a program using <map>, but when i compile i get error that point to code inside the MAP-file. I saw your post here, and i tried your small program, but … | |
Re: [code] //The following example overloads the + operator to add two complex numbers and returns the result. // operator_overloading.cpp// compile with: /EHsc #include <iostream> using namespace std; class Complex { public: Complex( double r, double i ) : re(r), im(i) {} Complex operator+( Complex &other ); void Display( ) { … | |
Re: another question: when I create a window, I use function CALLBACK WndProc(), if another dialog box will be triggered by clicking a certain button in this window, I may use another function CALLBACK DlgProc(). if there is other more, I may use another CALLBACK DlgProc().... could I integrate all those … | |
Re: Hi, I am trying to create a treeview control in a window that includes a toolbar and a status bar, I need to position the treeview immediately below the toolbar. In order to do this I need to calculate the height of the toolbar and used it as the Y … | |
Re: the MSDN description: hIconSm: Handle to a small icon that is associated with the window class hIcon: Handle to the class icon. But I still confused! when I creat a window "WNDCLASSEX wc", I could always only see the icon load by the wc.hIconSm when excuting, where to find the … |