Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8980405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:04:47+00:00 2026-06-15T20:04:47+00:00

I am trying to compile my code but I am not able to compile

  • 0

I am trying to compile my code but I am not able to compile it. I am using VS 2010 and I get this message:

‘Tel_zoznam.exe’: Loaded ‘C:\Windows\SysWOW64\msvcr100d.dll’, Symbols loaded.
Run-Time Check Failure #3 – The variable ‘p_prvy’ is being used without being initialized.

It stops at p_prvy->next = NULL;

Here is my code:

#include "stdafx.h"

#define MAX 31

typedef struct ZOZNAM{
    char meno[MAX];
    char priezvisko[MAX];
    char cislo1[MAX];
    char cislo2[MAX];
    char cislo3[MAX];
    struct ZOZNAM *next;
} ZOZNAM;

int main(void){
    char c;
    ZOZNAM * p_prvy;
ZOZNAM * p_akt;
    p_prvy->next = NULL;
    int z;
    p_akt=p_prvy;

    printf(" Pre pridanie kontaktu do zoznamu stlacte 'p'\n Pre vypis zoznamu zadajte 'v'\n Pre ukoncenie programu zadajte 'k'\n");
    z=pocet_zaznamov();
    printf("%d",z);
    while(1==1){
        scanf("%c",&c);

        switch(c){
            case 'p': vlozit(p_akt); break;
            case 'v': vypis(p_prvy); break;
            case 'n': nacitanie(p_akt); break;
        }
    }
    return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:04:48+00:00Added an answer on June 15, 2026 at 8:04 pm

    In your main() function, you have the following declaration of the p_prvy variable:

    ZOZNAM * p_prvy;
    

    Almost immediately after that, you say:

    p_prvy->next = NULL;
    

    Which means you are using p_prvy variable. However, it is not being initialized and so has unspecified value. This is called Undefined Behavior, or simply UB.

    What you need to do is initialize that pointer. For example, by allocating some memory:

    ZOZNAM * p_prvy = (ZOZNAM *)malloc(sizeof(ZOZNAM));
    

    You may also have it initialized to NULL, but then dereferencing NULL will take your process down.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile the next code, but I'm getting this error on the
When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
I am trying to compile code that works on os x and linux using
I trying to compile this code: Int64 itag = BitConverter.ToInt64(temp, 0); itag &= 0xFFFFFFFFFFFFFC00;
This is the first question I have found myself not being able to get
I'm trying to compile a project from the command line, like this: devenv.exe myproj.sln
I'm trying to play with some code..keep getting an compile error RND not declared
I'm currently trying to compile some code examples from http://developer.gnome.org/gtkmm-tutorial/unstable/sec-treeview-examples.html.en but from what I
I am trying to compile a code that uses Boost's zlib wrappers. However, no
I am trying to compile a code that has a include directory with some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.