User Profile

Collapse

Profile Sidebar

Collapse
EhYay
EhYay
Last Activity: Nov 21 '22, 01:23 PM
Joined: Oct 14 '22
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • EhYay
    started a topic Beginner: How store sentences in a variable?
    in C

    Beginner: How store sentences in a variable?

    How do you store whole sentences in a variable?

    I want to print out sentences using variables. I tested with a 'string' data type and stored individual sentences as an element then used a 'for' function to print them with a delay between each sentence. The result is an error, upon building it, saying at this line:


    Full code:
    Code:
    #include <iostream>
    #include <string>
    #include <windows.h>
    ...
    See more | Go to post

  • EhYay
    replied to Beginner: Cannot resolve Sleep()
    in C
    Sorry. I'm new to all of this, both as a site member and as a coder. I'll try to focus on answering questions and providing better data.
    See more | Go to post

    Leave a comment:


  • EhYay
    replied to Beginner: Cannot resolve Sleep()
    in C
    And when I meant cycled, I meant swapping the libraries between each run to see if there is any change.
    See more | Go to post

    Leave a comment:


  • EhYay
    replied to Beginner: Cannot resolve Sleep()
    in C
    To: dev7060

    The include directories are already present in the project folder.
    Other than that, something strange happened. cout and string, cout is no longer an issue and issue for some reason while string remains one. However, now Sleep() is functioning while cout is not.
    This horribly confused me until I decided to close then re-open my IDE which resulted in both those aformentioned codes
    Code:
    // Bytes977919_CannotResolveSleep.cpp
    ...
    See more | Go to post

    Leave a comment:


  • EhYay
    replied to Beginner: Cannot resolve Sleep()
    in C
    Yes, I have. e.g.
    Code:
    Sleep(1000);
    .
    See more | Go to post
    Last edited by EhYay; Oct 15 '22, 08:06 AM. Reason: I forgot to put in the semi-colon.

    Leave a comment:


  • EhYay
    started a topic Beginner: Cannot resolve Sleep()
    in C

    Beginner: Cannot resolve Sleep()

    I've been looking around the web about how to make the program wait for a set amount of time and discovered this type of code. However, my IDE says it cannot resolve Sleep(). I have included the appropriate library and even tried its variations. I'm confused about what's wrong and would much appreciate help.
    Code:
    #include <windows.h>
    #include <iostream>
    
    using namespace std;
    
    int main() {
    ...
    See more | Go to post
    Last edited by EhYay; Oct 15 '22, 08:05 AM. Reason: To supplement additional information about the OS, IDE and compiler and to post new findings while testing C++.
No activity results to display
Show More
Working...