0

I'm getting the error "too few arguments to function call, at least argument 'format' must be specified. It calls out the line for "h = get_int()" I've been looking all over for the answer and even dropped in some verified good code to test it but I couldn't get it work.enter image description here

1

get_int takes an argument, a string, which is the "prompt". From the CS50 Programmer's Manual:

SYNOPSIS

#include <cs50.h>

char *get_string (const char *format, ...);

DESCRIPTION

Prompts user for a line of text from standard input and returns it as a string (char *), sans trailing line ending. Supports CR (\r), LF (\n), and CRLF (\r\n) as line endings. Stores string on heap, but library’s destructor frees memory on program’s exit.

The prompt is formatted like printf(3).

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .