Question
Can someone one fix this to work in visual studios in c++? Errors I am getting are at the bottom. //node2.h #ifndef MAIN_SAVITCH_NODE2_H #define MAIN_SAVITCH_NODE2_H
Can someone one fix this to work in visual studios in c++? Errors I am getting are at the bottom.
//node2.h
#ifndef MAIN_SAVITCH_NODE2_H #define MAIN_SAVITCH_NODE2_H #include
namespace main_savitch_6B { template
template
template
template
template
template
template
template
template
template
template
template
#include "node2.template" #endif
//node2.template
#include "stdafx.h" #include
namespace main_savitch_6B { template
template
// Handle the case of the empty list if (source_ptr == NULL) return;
// Make the head node for the newly created list, and put data in it list_head_insert(head_ptr, source_ptr->data( )); tail_ptr = head_ptr; // Copy rest of the nodes one at a time, adding at the tail of new list source_ptr = source_ptr->link( ); while (source_ptr != NULL) { list_insert(tail_ptr, source_ptr->data( )); tail_ptr = tail_ptr->link( ); source_ptr = source_ptr->link( ); } } template
template
remove_ptr = head_ptr; head_ptr = head_ptr->link( ); delete remove_ptr; }
template
template
template
template
remove_ptr = previous_ptr->link( ); previous_ptr->set_link(remove_ptr->link( )); delete remove_ptr; }
template
//table2.h
#ifndef TABLE2_H #define TABLE2_H #include
namespace main_savitch_12B { template
private: main_savitch_6B::node
//table2.template
using namespace main_savitch_12B; template
template
template
template
template
template
template
template
template
//testlab2.cpp
using namespace main_savitch_12B; template
template
template
template
template
template
template
template
template
Severity Code Description Project File Line Suppression State Error C2228 left of '.push_back' must have class/struct/union TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 25 Error C2065 'list': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2275 'RecordType': illegal use of this type as an expression TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2955 'std::iterator': use of class template requires template argument list TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2146 syntax error: missing ';' before identifier 'i' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2143 syntax error: missing ';' before '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2143 syntax error: missing ')' before '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2059 syntax error: '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2065 'i': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2228 left of '.end' must have class/struct/union TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2059 syntax error: ')' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 29 Error C2059 syntax error: 'if' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 30 Error C2143 syntax error: missing ';' before '{' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 30 Error C2065 'i': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 31 Error C2043 illegal break TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 32 Error C2059 syntax error: '}' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 36 Error C2143 syntax error: missing ';' before '}' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 36 Error C2065 'RecordType': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 39 Error C2923 'main_savitch_12B::table': 'RecordType' is not a valid template type argument for parameter 'RecordType' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 39 Error C2955 'main_savitch_12B::table': use of class template requires template argument list TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 39 Error C2143 syntax error: missing ';' before '{' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 39 Error C2447 '{': missing function header (old-style formal list?) TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 39 Error C2065 'list': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2275 'RecordType': illegal use of this type as an expression TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2039 'const_iterator': is not a member of '`global namespace'' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2065 'const_iterator': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2146 syntax error: missing ';' before identifier 'i' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2143 syntax error: missing ';' before '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2143 syntax error: missing ')' before '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2059 syntax error: '=' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2065 'i': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2228 left of '.end' must have class/struct/union TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2059 syntax error: ')' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 64 Error C2059 syntax error: 'if' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 65 Error C2143 syntax error: missing ';' before '{' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 65 Error C2065 'i': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 67 Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 71 Error C2059 syntax error: '}' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 72 Error C2143 syntax error: missing ';' before '}' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 72 Error C2065 'RecordType': undeclared identifier TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 75 Error C2923 'main_savitch_12B::table': 'RecordType' is not a valid template type argument for parameter 'RecordType' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 75 Error C2955 'main_savitch_12B::table': use of class template requires template argument list TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 75 Error C2143 syntax error: missing ';' before '{' TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 75 Error C2447 '{': missing function header (old-style formal list?) TomHensonHW12 c:\users\tehen\source epos\tomhensonhw12\tomhensonhw12\table2.template 75
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started