logo
down
shadow

What is wrong with my code? My program will not compile


What is wrong with my code? My program will not compile

By : user3850187
Date : October 20 2020, 11:12 PM
To fix this issue Ok, so my assignment is to build on an existing code from the book. I have to add the 3rd box and then calculate the total for all 3 boxes. Here is what I've written so far, but it will not compile. Please help me find the problem. . , Change:
code :


Share : facebook icon twitter icon
Why doesn't this C program compile? What is wrong with this?

Why doesn't this C program compile? What is wrong with this?


By : user2108885
Date : March 29 2020, 07:55 AM
With these it helps Array size in C89/90 language must be specified by an integral constant expression (in general true for C99 as well). A const int object in C is not a constant expression, which is why you can't use it to specify array size. Note: this is one prominent difference between C and C++.
In C language the term constant refers to literal constants, i.e. 5, 10.2, 0xFF, 'a' and so on (enum constants are also constants, to be precise). const int object, once again, is not a constant in C and cannot be used to build constant expressions.
Program Will Not Compile - What am I doing wrong?

Program Will Not Compile - What am I doing wrong?


By : user3452000
Date : March 29 2020, 07:55 AM
around this issue I can't debug your filesystem issues. It would, however, be not difficult for me to do some translation of the errors.
Compiler says:
code :
character.h:6: error: expected unqualified-id before ‘using’
character.h: In constructor ‘Character::Character(const XMLCh*)’:
character.h:18: error: no matching function for call to ‘XercesString::XercesString(const XMLCh*&)’
xerces_string.h:5: note: candidates are: XercesString::XercesString()
xerces_string.h:5: note:                 XercesString::XercesString(const XercesString&)
character.h: At global scope:
character.h:24: error: expected class-name before ‘{’ token
character.h:26: error: ISO C++ forbids declaration of ‘vector’ with no type
character.h:26: error: expected ‘;’ before ‘<’ token
character.h:37: error: ISO C++ forbids declaration of ‘Attributes’ with no type
character.h:37: error: expected ‘,’ or ‘...’ before ‘&’ token
character.h:24: error: new types may not be defined in a return type
character.h:24: note: (perhaps a semicolon is missing after the definition of ‘GraphHandler’)
main.cpp:18: error: two or more data types in declaration of ‘main’
What program/s or application can compile my Java Server Code, Android Client Code and Asynctask code?

What program/s or application can compile my Java Server Code, Android Client Code and Asynctask code?


By : Никита Данилов
Date : March 29 2020, 07:55 AM
this will help I'm not sure what you mean by your ASyncTask code as this would be part of the android code.
Anyway, your android code can be run from Eclipse but you would need the Android SDK and ADT plugin for eclipse. Details of which can be found here. There are other IDEs but this is probably the most used and if you are beginner at android Google has all the documentation about eclipse which will make things easier.
Why won't this program compile? Why is this wrong?

Why won't this program compile? Why is this wrong?


By : S. M.
Date : March 29 2020, 07:55 AM
should help you out I know there is something wrong with the "if (isalpha(first))" but I dont know what to do to fix it. Can anyone tell me why this is wrong?
code :
if (isalpha(first))
Program will compile with no errors, but will not execute. What's wrong? (in C)

Program will compile with no errors, but will not execute. What's wrong? (in C)


By : user3221625
Date : March 29 2020, 07:55 AM
I wish this helpful for you Click Here To Run Your Program
code :
#include <stdio.h>
const double CEL = 32;
const double KEL = 459.67;

double FahToCel(double);
double FahToKel(double);
void clean_stdin(void);
int main()
    {
    double cel;
    double kel;
    double faren;
    char i = 'a';
    while (i != 'N')
    {
        printf("\nEnter a temperature in farenheit :\n"); 
        scanf("%lf", &faren);
        printf("%lf Farenheit is equal to %lf Celsius, and %lf Kelvin\n", faren, FahToCel(cel), FahToKel(kel));
        if (kel <= -274)
            printf("Atomic motion has stopped\n");
        else if ((kel >= -274) && (kel <= 273))
            printf("Water freezes here\n");
        else if ((kel >= 274) && (kel <= 280))
            printf("You'll need a sweater\n");
        else if ((kel >= 281) && (kel <= 294))
            printf("A bit chilly\n");
        else 
            printf("Ahh, that's better\n");
        printf("Do you want to Continue ? ( N : Stop) : \n"); 
        clean_stdin();
        scanf("%c",&i);
    }
    return 0;
}

double FahToCel(double faren)
{
    double cel;
    cel = (faren - CEL) * 5/9;
    return cel;
}

double FahToKel(double faren)
{
    double kel;
    kel = (faren + KEL) * 5/9;
    return kel;
}

void clean_stdin(void)
{
    int c;
    do {
        c = getchar();
    } while (c != '\n' && c != EOF);
}
Related Posts Related Posts :
  • My program crashes when I try to change private values from an object
  • Unordered_map with custom class as key
  • Strict aliasing rules broken with templates and inheritance
  • C++ Derived Class Override Return Type
  • singly linked list c++ constructor, destructor and printing out
  • How to clone class with vector of unique_ptr to base class
  • error: no match for operator
  • std::vector doesnt accept my struct as template
  • selection of people's contours
  • how to fix the (Error using mexOpenCV) on matlab?
  • Is or was there a proposal for c++ to use the context for short enum values?
  • Fair assumptions about std::hash implementations
  • undefined reference to libusb using cyusb
  • Function returns null pointer instead of address
  • C++17 copy elision and object destruction
  • Input multiple strings via operator>> c++
  • Avoiding overflow boost container
  • How to Write a Lambda Wrapping a Function with Optional Return Value
  • Partial specialization with more template parameters
  • How to convert fixed size array to pointer on pointer array
  • Memory leak in const member constructor with tag dispatching
  • C++ function with a generic and optional class
  • Custom QGraphicsItem That Contains Child QGraphicsItems
  • Are There Restrictions on What can be Passed to auto Template Parameters?
  • Rotating line inside rectangle bounds
  • Why do I need dynamic memory allocation if I can just create an array?
  • How can I convert a text file into a form that MPI_Bcast can send?
  • How to get array of all `this` of an instance
  • Using pointers as parameters
  • Automatic type deduction with const_cast is not working
  • Why does std::is_rvalue_reference not do what it is advertised to do?
  • Function Template Specialization with Forward Declared Type
  • template deduction failed in vector
  • Is there a signed `sizeof` alternative in Qt
  • clarification on overloading the -> operator
  • What is __m128d?
  • QtConcurrent: why releaseThread and reserveThread cause deadlock?
  • Function receiving different value than passed
  • Can C++ close a '''fstream''' variable after '''.close()'''?
  • Is it necessary to overload operator in this specific case
  • Comparing an element of a string array with a string
  • how to dereference a pointer of a map of pointers to objects in c++
  • How recursive function control flow change for static variable?
  • SDL 2 blitting BMP File
  • Why does an extremely large value cause this code to repeat infinitely?
  • Function returning different value than what is in function body before return statement
  • Struggling with including Headers in another header file (C++)
  • WebViewProcessControl initialization crash
  • C++ exception 0xC00000FD: Stack overflow (parameters: 0x00000001, 0x00C02F30)
  • What's difference between forward and move in the constructor of class?
  • C++: Is it possible to condense `bool` objects within the same byte?
  • I cant understand this access modifier
  • Boost Spirit X3: Collapsing one-element lists
  • How can I add a char to an istringstream?
  • Wrapping variadic templates in pybind11
  • C++ referencing instances created within a function's scope
  • c++11 invoke a type conversion while moving an object
  • Generate a fixed number of 1s on random positions
  • OpenCL C++ wrapper. Is it possible to extract the platform and device from a Context class?
  • C++: convert chrono::high_resolution_clock to time_t
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org