|
|
Voted 1 for the 'gimme codez' aspect. We're not here to make you artificially pass a course that you aren't competent in.
Most courses are well graded and it's hard to suggest a better place to start than your course. Is it a school/university course with lectures and real people giving it? If so, if there are small parts that you don't get, you may need to ask your teacher/lecturer or class to explain it in a different way until it goes in. If it's a self-taught course from a book or online, take it slowly, practice each step until you really get it, and then move on to the next one.
Reading the material is never enough, you need to practice doing as well. Most courses have exercises every chapter, and if you want to learn, you will want to do those.
|
|
|
|
|
How to solve your problem: Baby steps.
As you can see, it's too hard for you to do all at once, but breaking it down into simpler steps that are more manageable will enable you to do it. (I'm a professional programmer, and this approach works for me when I'm faced with a task that's too hard to do all at once.)
The first step is to get a program running. C programmers start with a program that simply prints "Hello world." on the console, and this would be a good first step for you. It requires you to be able to edit a file to add the code, and compile and run it. You'll have to look up the statement that outputs text to the console. (Looking it up is good practice, because this is how you acquire programming knowledge you don't already have. We all do it.)
The next step is accepting input from the command prompt. (More lookup.) Don't be afraid to experiment! This is an important way of learning what works and what doesn't.
The next step is getting the input into numeric variables you can use to calculate grades.
If you think your program is behaving incomprehensibly, use what you learned in the first step to print out the values of some variables to see what's REALLY happening as your program executes. (Later you'll learn how to use the debugger to do this. The debugger will save you HOURS of guesswork -- learn it.)
Baby steps. Good luck!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
|
|
|
|
|
Quit, re-enrol in an arts class.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Its best that you try something - write some code and then post questions related to that code here.
This will help you learn faster.
|
|
|
|
|
Help I don't know what I'm doing wrong.
the below code is in my form but I am getting
the results below from textBox3.Text = Convert.ToString(Dns.GetHostEntry("google.com"));
what returns into the textbox is System.Net.IPHostEntry
i try textBox3.Text = Convert.ToString(Dns.GetHostAddresses("google.com")); and i get System.Net.IPAddress[] in the textbox I tried a new project doing the same things and its still giving me this, IDE is VS2010 Visual C#
using System;
using System.Net;
using System.Net.Sockets;
using System.Web;
using System.Net.NetworkInformation;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
private void Login_Load(object sender, EventArgs e)
{
m_ChildForm = new MainChat(this);
textBox3.Text = Convert.ToString(Dns.GetHostAddresses("www.google.com"));
}
modified 6-Jun-12 20:41pm.
|
|
|
|
|
Convert doesn't know how to make an IP address into a string, but System.Net.IPAddress knows how to turn itself into a string.
textBox3.Text = Dns.GetHostAddresses("www.google.com").ToString;
Ain't Google/MSDN wonderful?
Peter
[edit] Didn't notice the plural addresses. You'll need to wrap a loop around it... [/edit]
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
The result i get in te textbox from that is
System.Net.IPAddress[]
someone suggested that I put in
Dns.GetHostEntry("google.com").HostName
the result from that was 'google.com' in the textbox
nothing is working... I tried a new console app project and i get same result
but when i do a powershell i get the result below, but not in my application. PLEASE HELP!
[System.Net.Dns]::GetHostAddresses("google.com")
Address : 2575508806
AddressFamily : InterNetwork
ScopeId :
IsIPv6Multicast : False
IsIPv6LinkLocal : False
IsIPv6SiteLocal : False
IPAddressToString : 70.37.131.153
modified 6-Jun-12 23:16pm.
|
|
|
|
|
After a bunch of tries i figured it out, it wouldn't let me convert IPAddress[] to IPAddress so then i figured its an array so let me just imply the index 0 to see whats in it. the code below works
IPAddress[] blah = Dns.GetHostAddresses("google.com");
System.Console.WriteLine(blah[0]);
|
|
|
|
|
Member 893460 wrote: it wouldn't let me convert IPAddress[] to IPAddress
Which is quite normal; how would you expect it to convert an array of objects into a single object?
|
|
|
|
|
When I said "wrap a loop around it" I meant something like
IPAddress[] adrslist = Dns.GetHostAddresses("www.google.com");
foreach System.Net.IPAddress ipadrs in adrslist {
.... = ipadrs.ToString;
}
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
thanks for that solution as well. I this would be great for something that requires you to obtain all the ip addresses, I just needed one for a textbox
|
|
|
|
|
mọi người giúp dùm mình vs 
|
|
|
|
|
Google translate thinks that is Vietnamese:
"need help moving vehicle code
help his people vs Corner"
I'm sure English is not your native language, but it is the default language for this site.
In English, your question makes no sense at all.
Please, either try to find a better translation of your question to English, or find a site in your own native language, as they may be able to help you better than we can!
Use the "Improve question" widget to edit your question and provide better information.
Tôi chắc chắn rằng tiếng Anh không phải ngôn ngữ mẹ đẻ của bạn, nhưng nó là ngôn ngữ mặc định cho trang web này.Trong tiếng Anh, câu hỏi của bạn làm cho không có ý nghĩa ở tất cả.Xin vui lòng, hoặc cố gắng để tìm một bản dịch tốt hơn của câu hỏi của bạn sang tiếng Anh, hoặc tìm một trang web bằng ngôn ngữ mẹ đẻ của bạn, vì họ có thể có thể giúp bạn tốt hơn so với chúng ta có thể!Sử dụng "Improve question" phụ tùng để sửa câu hỏi của bạn và cung cấp thông tin tốt hơn.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Sorry but posting this question in a language other than english has narrowed down those who can answer your question by a great deal.
|
|
|
|
|
|
Language, Timothy!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Sorry - I meant to say "olifant"

|
|
|
|
|
Or "Fachyderm"!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I had to google that one...

|
|
|
|
|
Hi,
Does anyone know how can I handle any touches in windows, even when my application is minimized?
The idea was to maximize/minimize it when the user touches the screen with 3 or 4 fingers.
I was trying to find some kind of event from COM, but I don't know even if that's the way to go.
Any help is very appreciated!!
Thanks!
|
|
|
|
|
danielnbarros wrote: Does anyone know how can I handle any touches in windows, even when my application is minimized?
A minimized application does not have input-focus, and will receive a lot less notifications from Windows.
With a keyboard, I'd suggest a keyboard hook to catch your "hotkey". With "touch", it might be confusing if someone inserts a device that does not support multi-touch.
Bastard Programmer from Hell
|
|
|
|
|
How to make a screenshot of the screen and put it in and save a PictureBox1 SaveFileDialo
modified 6-Jun-12 8:18am.
|
|
|
|
|
This is an English speaking site.
Translated:
How to make a screenshot of the screen and place it to PictureBox1 and save through SaveFileDialo < g
...
Do so, but I save it in the folder of the Nada program, and through the SaveFileDialog # WindowsForm
|
|
|
|
|
ImageMemXfer ?
|
|
|
|