- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 1
how do i convert a string to a color. heres an example of where i need to convert the string "mycolor" [CODE]string mycolor = "Blue"; Graphics graphics = paint_pnl.CreateGraphics(); graphics.FillEllipse(new SolidBrush(Color.mycolor), e.X, e.Y, 4, 4); graphics.Dispose();[/CODE] |
|
heres my question: which tend to change more frequently: interfaces or implementations? How does proper OO design take advantage of this observation? I think the answer is implementations |
|
why does this produce compile-time error? [CODE]int [] a = new int[10]; foreach(int val in a) { val=0; )[/CODE] |
|
the problem stats" [B]copy instructor:[/B] initializes a copy of an IntSet given another IntSet as a parameter. The new IntSet is a copy of the IntSet parameter. i need to copy my class using a constructor. IntSet is the class which is a class for setting up arrays as true … |
|
[B]constructor with array parameter.[/B] Internal array is assigned values as indicated by the parameter. An example of the use of this contructor is: - int values[] = {2,5,7}; - IntSet a = new IntSet(values); // create a set with elements{2,5,7} im very very confused on his wording, i dont know … |
|
hello, I'm somewhat new to c# and am trying to make/reduce fractions. the numbers only range from 1 through 10. i was thinking about using a bool true/false to check if the numerator divides by the denominator and still produce ints and not floats. such as 2/10 = 1/5 I … |
|
i'm new to c# so i don't know how to use a for loop to increment my nums. num[i] apparently doesn't work in c# [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int num1; int num2; int num3; int … |
|
I need help with inputing the file. The file has the "lastName" "firstName" "phoneNumber" "email" then a new line. When i read in all 4 rows it says the first line in all 4 rows. the infile is in main [CODE]#include <iostream> #include <fstream> using namespace std; void mainMenu(); void … |
|
my code is supposed to read in a binary file and then save the input to a text file. when i cout << coach[i] i get the output and jibberish [CODE]#include <iostream> #include <string> #include <cctype> #include <fstream> #include <cstdlib> using namespace std; int main() { char coach[500]; int i=0; … |
|
Right now i am having difficulty skipping the blank lines in the txt file i read in. I read in all the material i need, but the blank lines come in too and messes up my array. this is my txt file #### #M## #..# ##.# #..# #### 0 S … |
|
i have to write a program that will read in a txt file that also has periods, exclamations, question marks and <CR>(returns). and do some other stuff. right now i am having trouble with comparing the words..... this is at the very bottom of my code [CODE]#include <iostream> #include <fstream> … |
|
I have to write a program that accepts a pointer to a c-string as its argument. The function should return the charater that appears most frequently in the string along with the number of times it appears. for example, if i input "hello dolly" the output would be: "l sppears … |
|
for this function i need help with the email part. I am trying to string compare domain with 3 different string possibilities (.com,.org,.edu). void add(char firstName[][32],char number[][9],char email[][32],char lastName[][32],int count) { int i; int length; char domain[3]; cout << "enter their name\n"; cin >> firstName[count]; cin >> lastName[count]; cout << … |
|
this function needs to ask for a persons name, phone number, and email. BUT it only needs to do this once at a time because it returns to a menu and asks if they want to add more people. I need a way to increment count by 1 each time … |
|
I have to call in two files, both have 20 letters in them. my program needs to be able to handle up to 50 chars and stop at the blank space. i need help getting the chars into the array and stopping at blank space [code] #include <iostream> #include <fstream> … |