Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-19-2005, 08:20 AM   #1 (permalink)
Zyko
Registered User
 
Join Date: Jun 2005
Posts: 1
Zyko is on a distinguished road
Invalid conversion

Hi, first post ..

I'm having a problem, my compiler doesnt want to convert a `char' to a `char*'.

The Code:
Code:
#include <iostream>
#include "md5.h"

int main () {

char* bokisar="abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789_-";

int k=0;
while(k < 62)
{
char *hash= bokisar[k];
std::cout << "MD5 Key of '"<< hash << "' = " << MD5String(hash)	<< "\n";
k++;

} 
	
	return 0;
}
That is giving me a warning on the line containing: char *hash = bokisar[k];

It compiles but returns exited with status 10 (SIGBUS).

OS: OSX Tiger.


I actually have no idea what to do and MD5String must have a pointed char..
Zyko is offline   Reply With Quote
Old 06-20-2005, 04:30 AM   #2 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,544
Valmont is on a distinguished road
remove the '*' in:
char *hash

Otherwise you're trying to initialize a string object with a single character.
__________________
Valmont is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
String Conversion Kernel_Killer Standard C, C++ 6 12-14-2004 09:26 AM
GUID to string conversion milena Platform/API C++ 1 09-14-2004 12:04 PM
void * conversion problems Lovecraft Standard C, C++ 6 04-28-2004 03:51 AM
invalid conversion paul Standard C, C++ 3 02-02-2004 10:58 AM
Character conversion socomm Standard C, C++ 8 05-27-2003 07:29 PM


All times are GMT -8. The time now is 09:05 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting