- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: If you have for example: 1,2,3,4,5,6 = 4+3/2 = 3.5 Then if you miss one number you got for example: 2,3,4,5,6 = 4 or 1,2,3,4,5 = 3 So in most cases the median will be wrong if you discard/miss one number. Therefore its proved that you cant discard any values. | |
Re: Do not get "The c++ Programming Language Third Edition" first, i got stuck very quickly as a newbie. I make good progress using "Accelerated C++ 2000" however, alot easier to understand. Also [url]www.learncpp.com[/url] is a great free guide! The most beginner-friendly i have encountered so far. | |
Re: Try [CODE]for (list<bullet>::iterator i = bullet_list.begin(); i != bullet_list.end(); ++i) { bool isalive = i->alive; // do stuff[/CODE]Edit: Lists dont got the [] operator because it would be very slow, so you have to work with iterators. | |
Re: Hey, im pretty new myself, and i dont know wich language you use, but i would try this: In App_Code you can add a .vb file with this code: [CODE]Public Structure NameAndMail Public name As String Public email As String End Structure[/CODE] And then make a List(Of NameAndMail) to pass … | |
Re: Wich control are you using? The ListView and Gridview controls are good for displaying several rows. | |
Re: Try to remove .ToString from: [CODE]'Load Printer against Brand Name Dim BrandName As String = ddlSelectBrand.SelectedItem.Text[COLOR="Red"].ToString[/COLOR][/CODE] | |
Re: Hello, you can pass the DropDownList as a reference to the function like this: App_Code/Class1.vb: [CODE]Imports Microsoft.VisualBasic Public Class Class1 Public Shared Sub Fillvalue([COLOR="red"]ByRef myList As DropDownList[/COLOR]) For i = 0 To 10 myList.Items.Add(i) Next End Sub End Class [/CODE] Default.aspx.vb: [CODE]Imports Class1 Partial Class _Default Inherits System.Web.UI.Page Protected Sub … | |
Hello I am working on a Asp.net website where i can upload images. When i upload images i resize and save 3 different images: Original, Picture and a Thumbnail. My problem is that when i resize .Gif images they just end up with ugly colours and without animation. I had … | |
Re: You can do it programmatically with linq if you know how to use that. Thats my favorite way of making customized queries on different events. A code example if you know visual basic.net: [CODE] Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Using myEnt As New … | |
Re: You only need a form in the MasterPage, atleast thats how i learned it. | |
Hello, i got stuck again. When i read the text it all makes sense, but putting it all to use is a different story.:zzz: Accelerated C++ excersise 15-4: [QUOTE]15-4. Add an operation to reframe a Picture, which changes the frame characters. The operation should change all of the frames in … | |
Hello friends, i have found an amasing book for learning ASP.NET, and i just have to tip you of about it! "Beginning ASP.NET 4 in C# and VB by Imar Spaanjaars" has to be the best book i have ever read, it teaches you everything you need to know, and … | |
Hello, my hard drive has a really weird problem: When i turn on my computer normally the hard drive will make mechanical clicking sounds, as if the "reader head" was hitting something over and over again. Then a few seconds later the sound will stop, but my pc wont find … | |
Re: When i compiled i got the error:[QUOTE]1>c:\users\andreas\documents\visual studio 2008\projects\nji\nji\nji.cpp(36) : error C2668: 'pow' : ambiguous call to overloaded function 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(575): could be 'long double pow(long double,int)' 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(527): or 'float pow(float,int)' 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(489): or … | |
Hey, i have read "Accelerated C++" and i am "soon" done with "The C++ Standard Library". I would like to learn about Windows Forms Applications or something similiar where i can start creating more useful programs. Can anyone recommend anything? Is it too early for me to jump to this? | |
Re: The code worked when i tested it. Printed the characters in ..\Projects\test2\test2\A.txt until it hit space. | |
Re: remove [COLOR="Red"]cin >> celsius; [/COLOR] in calcCelsius. Edit: You should use reference instead of just copying the values: [CODE]void getFahrenheit(int); // Here you copy an object from main and read a value into the copied(not the same) object. void getFahrenheit(int&); // Here you refer to an object from main and … | |
Re: The digits and letters are both chars in a string. :) The chars are held together by an array. | |
Re: It looks like you did not declare a string. [CODE]#include <string> using namespace std; string str; str.length()[/CODE] | |
| |
I finally got this exercise working and i just need someone to tell me im awesome. Or just some feedback or tips on what i can improve(probably alot:)).[QUOTE]Write a program which performs addition, subtraction, multiplication of matrices. The dimensions of both the matrices would be specified by the user (dynamic … | |
Re: First you can sort the string using sort, defined in <algorithm>: [CODE] string s = "car"; sort(s.begin(), s.end());[/CODE] Then you print it to the screen: [CODE] for(int i = 0; i != s.size(); i++) { cout << s[i]; //Here you can insert a for loop to count how many //times … | |
Re: You can not make more functions that way. What you can do is for example: EDIT: [CODE]void function1() { cin.clear(); cin.ignore(255, '\n'); cin.get(); exit(1); } ... if(output == pasword) { cout << "\nPassword change complete.\n" << endl; main2(); //Here you can call function1() ... if(z == y) { main2(); //Here … | |
Re: This is one solution: [CODE] for (int i = 0; i < ARRAY_SIZE; i++) { int n = 0; for(int j = 0; j < ARRAY_SIZE; j++){ if(myList[j] == myList[i]) n++; } if( myList[i] != 0 ) cout << myList[i] << " appears" << n << "times." << endl; }[/CODE] | |
Re: I think you can do this: 1. Declare arrays. 2. Loop that reads the names into array nr 1. 3. Loop that counts how many times each name appears in array nr1, then puts the number for each word into array nr 2. It also puts the name into array … | |
Re: You must start on the top and work your way around all the errors. EDIT: I started looking in Tool.h and half the stuff was missing or wrong, you have to start with something alot easier.[CODE]#ifndef TOOL_H #define TOOL_H #include <string> using std::string; const int LENGTH = 30; class Tool … | |
Re: There are many things wrong with the code. Here is a code that does what you want, and looks almost the same: [CODE]#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if(s == "oscar") ; else{ cout << "\n\aIncorrect password.\n" << endl; system("pause"); return … | |
Re: Map is a kind of hashtable isnt it? Anyway I wanted to try so I came up with this: [CODE]#include "stdafx.h" #include <map> #include <string> #include <iostream> #include <fstream> int main() { using namespace std; map<string, int> m; string s = "Hello my name is Andreas."; for(string::const_iterator first = s.begin(), … |