• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • About
  • Life
  • Tech
  • Travel
  • Work
  • Questions
  • Contact

Welcome

.

warning: null character ignored [-Wnull-character] in C++

April 10, 2020 by

Questions › warning: null character ignored [-Wnull-character] in C++
0
Vote Up
Vote Down
Garmaine asked 3 years ago

The little code I have compiles fine but when I go to run IntVector.cpp I get literally thousands of warnings like the following:

 IntVector:3:1533: warning: null character ignored [-Wnull-character]
  ...<U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000><U+0000>
 IntVector:8:3: warning: null character ignored [-Wnull-character]
<U+0008><U+0000><U+0000><E9><U+0000><U+0000><U+0000><U+0000>H<8D>E<D0>H...
 ?IntVector:9:2415: warning: null character ignored [-Wnull-character]
  ...<U+0000><U+0000><9E><U+0000><U+0000><U+0000>|<U+0003><U+0000><U+0000>...

And so on. This is my first time trying to run a C++ program so I suppose the problem could be in my setup. I'm on Mac and using Emacs to code and compile and terminal to run it.

IntVector.cpp

#include <iostream>
#include "IntVector.h"
#include <cmath>
using namespace std;


  int* array = new int[0];
  int num_elements;
  int array_size;
  int expansion_factor;

void IntVector::expandArray(){

  }
void IntVector::add(int val){

    cout << "Hello"; 
  }
void IntVector::remove(int index){   
  }
int IntVector::get(int index) const{
    return index;
  }
void IntVector::removeLast(){
  }
void IntVector::set(int index, int val){
  }

std::string IntVector::toString()const {
    return "";
  }

IntVector::IntVector(int initial_size){

  }

IntVector:: ~IntVector(){}


int main(){

  IntVector v(5);
  v.add(5);

}

IntVector.h

#ifndef INTVECTOR_H_
#define INTVECTOR_H_

using std::cout;
class IntVector {
private:
  int* array;
  int num_elements;
  int array_size;
  int expansion_factor;
  void expandArray();
 public:
  void add(int val);
  void remove(int index);
  int get(int index) const;
  void removeLast();
  void set(int index, int val);
  std::string toString() const;
  IntVector(int initial_size);
  ~IntVector();


};
#endif  
Are you looking for the answer?
Original Question and Possible Answers can be found on `http://stackoverflow.com`

Question Tags: c++

Please login or Register to submit your answer




Primary Sidebar

Tags

Advancements architecture beautiful life best building calling city commercial convenience employment Finances Cognitive decline Future gadgets Hidden Gems highway Home houses hydration Impact Innovations lamp lighting Mental health military tech Must-See New York City occupation Productivity recreation romance sepia shopping sippy cups smartphones social Technological breakthroughs technology toddlers Treasures turns Uncover Well-being Wonders Work Young onset dementia

Newsletter

Complete the form below, and we'll send you all the latest news.

Footer

Footer Funnies

Who knew that reading the footer could be such a hilarious adventure? As we navigate websites, books, and documents, we often stumble upon the unassuming space at the bottom, only to discover a treasure trove of amusement. In this side-splitting compilation, we present 100 jokes that celebrate the unsung hero of content – the footer. Get ready to chuckle, giggle, and maybe even snort as we dive into the world of footnotes, disclaimers, and hidden comedic gems. Brace yourself for a wild ride through the footer!

Recent

  • Unveiling the Enigma: Almost-Magical Lamp Lights Highway Turns
  • The Impact of Young Onset Dementia on Employment and Finances: Optimizing Post-Diagnostic Approaches
  • 11 Wonders of 2023 Technological Breakthrough – Unveiling the Future
  • Work from Home and Stay Mentally Sane – Achieve Productivity and Well-being
  • Hidden Gems of New York City – Uncover the Must-See Treasures!

Search

Tags

Advancements architecture beautiful life best building calling city commercial convenience employment Finances Cognitive decline Future gadgets Hidden Gems highway Home houses hydration Impact Innovations lamp lighting Mental health military tech Must-See New York City occupation Productivity recreation romance sepia shopping sippy cups smartphones social Technological breakthroughs technology toddlers Treasures turns Uncover Well-being Wonders Work Young onset dementia

Copyright © 2023