[NSWI004] Questions about assignment 00
Vojtech Horky
horky at d3s.mff.cuni.cz
Mon Oct 5 16:33:52 CEST 2020
Hello.
Dne 05. 10. 20 v 16:28 Quoc Anh Nguyen napsal(a):
> I have 2 questions regarding the assignment 00. I commited my
> implementation of the simple_printf function to GitLab. In my
> implementation, I use std::string, std::vector, stdarg.h and stdio.h
> simply by adding
>
> #include "print.h"
> #include <vector>
> #include <string>
> #include <stdarg.h>
> #include <stdio.h>
>
> to the beginning of the source file. This works fine in Visual Studio
> 2019 on Windows. How do I make it work on Linux? If I try to compile my
> code on Linux using gcc, the compiler says that it cannotĀ find the file
> "vector".
The assignment targets plain C language, not C++. Therefore, you do not
have standard C++ library available.
By the way, the assignment does not require any functions from standard
library (libc). The only exception is putchar for simple_printf and
malloc/free for the frequencies.
> The 2nd question is about part 2 of the assignment. What exactly does
> "computing string frequencies" mean? Does it mean for example if I have
> an input string "this is a string", the frequency of string "is" would
> be 2? The frequency of string "randomStr" would be 0? So by "required
> information about string frequency" would be the string itself and how
> many times it has appeared?
Have you looked at the provided tests? They document the API too if the
text is not clear enough.
Hope this helps.
Cheers,
- VH
More information about the NSWI004
mailing list