Thread: help in basic C

  1. #16
    Registered User
    Join Date
    Oct 2007
    So can I make the combine function return str1? Putting str1 at the beginning of the function prototype? Also for my problem with my linked list, needing to have another prompt to add to the linked list and redisplay: should I use the pop or insert function? I have never used either, but I think I need to. I am not sure how

  2. #17
    Registered User
    Join Date
    Oct 2007
    I tried to make those changes, but it seems to have more errors.
    #include "stdafx.h"
    int _tmain(int argc, _TCHAR* argv[])
    	char combine(char*new_str1, int n, char c, float f);
    	char str1[100];
    	int n;
    	char c;
    	float f;
    printf("\nEnter an integer:\n");
    	scanf_s("%d", &n);
    	printf("\nEnter a character:\n");
    	scanf_s("%c", &c);
    	printf("\nEnter a floating point number:\n");
    	scanf_s("%f", &f);
     combine(str1, n,c,f);
    	return 0;
     char combine(char*new_str1,  n,  c, f,)
    		str1=sprintf_s(str1, "%d, %c, %f", n,c,f);
    	return (str1);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 10:28 AM
  2. what are your thoughts on visual basic?
    By orion- in forum A Brief History of
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM
  3. visual basic vs C or C++
    By FOOTOO in forum Windows Programming
    Replies: 5
    Last Post: 02-06-2005, 08:41 PM
  4. Basic Graphics programming in C, please help
    By AdRock in forum Game Programming
    Replies: 3
    Last Post: 03-24-2004, 11:38 PM