560 Posted Topics

Member Avatar for Hiroshe

I'm trying to make a simple prime number generator for bigger program. It needs two numbers (n and c) and needs to edit them. So I decided to put the numbers in pointers, and just give the adress two the pointers. After about a half-houre of fumbling with *'s and …

Member Avatar for tux4life
0
154
Member Avatar for Hiroshe

Lately, I've been looking into cryptography, and I'm seeing if I can make a fun, maybe half-decent symetrical encryption alorithm. I am no professional, I've just seen a few algorithms online. I've came up with a few ideas: Version 1) I started of with simple xor encryption. I've learned that …

Member Avatar for thoughtcoder
0
148
Member Avatar for Hiroshe

I'm trying to solve [URL="http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtcg4LEghjb250ZXN0cxh5DA"]this[/URL] problem. The input file I used was the one on the site: [CODE]4 9 0123456789 oF8 Foo oF8 0123456789 13 0123456789abcdef 01 CODE O!CDE? A?JM!.[/CODE] My abstract idea was: Read the first line, loop the program that many times. Read the next line. Load the …

Member Avatar for Hiroshe
0
216
Member Avatar for vinitt88

Are you trying to make a shell that will run ontop of windows executing windows/dos programs? Just keep track of your current directory youself in an extra variable. Example: [CODE]cd c:\myprogram[/CODE] The current directory variable now holds: c:\myprogram\ (remember to check if it exsists) [CODE]main[/CODE] Would first check to see …

Member Avatar for Ancient Dragon
0
146
Member Avatar for miniroselit

Can you refraise your question? Sounds like this is a puzzle of some sort.

Member Avatar for ArkM
0
98
Member Avatar for Hiroshe

I just wrote a simple function to convert a number with any base into a base 10 number: [CODE=c]#include <stdio.h> #include <math.h> #include <string.h> int tobase10(int *input, int size, int base); int main() { int input[256] = {2, 2, 1, 0}; printf("%d\n", tobase10(input, 4, 3)); printf("Press any key to continue …

Member Avatar for Hiroshe
0
171
Member Avatar for krutthika

LAME. [URL="http://lame.sourceforge.net/index.php"]Click here[/URL]

Member Avatar for monkey_king
0
102
Member Avatar for Hiroshe

Here's the deal. I have two arrays. One defining a character set(could be any length), and another defining a string. I want to switch every letter in the string with its placement on the character set. For example: chrset[256] = "abcdefg" string[256] = "gfdc" will turn into: chrset[256] = "abcdefg" …

Member Avatar for Hiroshe
0
101
Member Avatar for Hiroshe

Just getting back into c (I've been dosing assembly for the last few months), so don't laugh at me :S I'm trying to read an input file. The fist line contains how many lines to read. The rest of the lines contain 3 words. Here's an example: [CODE]3 Hello, World …

Member Avatar for kenji
0
105
Member Avatar for Hiroshe

Hey I'm learning assembly (low level only for now) on my linuxbox. Could someone convert the following c++ to asm(low level) so i can learn how to do math operations? #include <iostream> using namespace std; int main() { int a = 10; int b = 12; cout<<a+b<<endl; } Of course …

Member Avatar for Salem
0
112

The End.