exitsign's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 6 (0.02 per day)
- Joined:
- 26-September 12
- Profile Views:
- 145
- Last Active:
Oct 30 2012 02:01 PM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: BA or BS
Posted 11 Oct 2012
Yeah I think I am just going to do the BA. I'm struggling right now with the BS. I'm just not the type of person that can accept something that is inferior in any way. That is what's making this difficult for me.
If it really matters I could stay in school an extra couple semesters and get that BS, but if it doesn't matter then I will just get the BA.
Also, does anyone know anything about getting into grad school with a BA in computer science.. I heard schools don't like it. -
In Topic: Is it possible to convert char to int?
Posted 26 Sep 2012
jjl, on 26 September 2012 - 05:28 PM, said:No, integers are 4 bytes, chars are a signle byte. Your for loop iterates a integer array and assigns each 4 byte integer to a 1 byte character. A memcpy will copy the character array into the integer array byte for byte.
Can you clarify what your trying to accomplish
I need to be able to take in 10 ints through the command line. Then I have another function where I use an algorithm on the ints. That part works. I've tested it by manually inputting ints with cin. My problem is just that c++ takes the numbers in in a pointer to a character array because of:
int main(int arg, char** argv)
Okay I got it now. All I had to do was use atoi() -
In Topic: Is it possible to convert char to int?
Posted 26 Sep 2012
jjl, on 26 September 2012 - 05:02 PM, said:A only char represents 8-bits of memory, the only value you can retrieve from chars are ascii values.
If you are trying to "combined" every 4 chars into an integer, well then you can do a simple memcpy
So would I replace what's in my for loop with
memcpy (n,*args,and idk what to put here...)
-
In Topic: Is it possible to convert char to int?
Posted 26 Sep 2012
int main(int arg, char** args) { int n[10]; for(int i = 0; i < arg-1; i++) { n[i]=*args[i]; }
My Information
- Member Title:
- New D.I.C Head
- Age:
- Age Unknown
- Birthday:
- Birthday Unknown
- Gender:
Contact Information
- E-mail:
- Private
Friends
exitsign hasn't added any friends yet.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
exitsign has no profile comments yet. Why not say hello?