Hi,
I want to declare a variable of type (Vector of pairs) - Ok, I know this
can be done using a map, but I want to keep things simple for now.
I have declared the variable as ff in this code snippet:
#pragma once
#include <string>
#include <utility>
#include <map>
using namespace std;
vector<pair <int, int>> linePairs ; // <- compiler cringes here
Compiler err messages are as ff:
syntax error : missing ';' before '<'
'Script::vector ' : missing storage-class or type specifiers
expecting '>' to terminate template-argument-list, found '>>'
unexpected token(s) preceding ';'
Any pointers (no pun intended !) would be much appreciated.
Jul 23 '05
24 1453
"Simon" <sp********@exa mple.com> schrieb: BTW: You could configure at least a charset.
Why on earth would I do that?
I said "You could". Of course you will not, I know.
T.M. > BTW: You could configure at least a charset. Why on earth would I do that?
I said "You could". Of course you will not, I know.
And I said, (amongst other things), why would I want to do that? T.M.
Simon
Susan Baker wrote: This is a "fuller" snippet of code:
#pragma once
#include <string> #include <utility> #include <map>
using namespace std;
class Script { private: string name ; string source_code ; vector< pair <int, int> linePairs; // <- compiler dosen't like this
(a) don't top-post
(b) the closing angle bracket is missing. ........
Torsten Mueller <de******@share d-files.de> wrote in
news:u3******** ***@fastmail.fm : Is using a computer forgetting that their was an outer world?
I tried to relativate your opinion, most of the readers see wrong positions pointed to by my pointer. Indeed most of the Outlook Express users will have wrong positions because they never did setup a monospace font using still the default proportional one. I don't know *any* other news reader using a proportional font by default.
Actually XNews defaults to a proportional font when reading (but not when
writing, go figure...). However it does have a button to click to change
to a non-proportional font at will...
i have to admit monospace makes reading a lot tiring. Even Bjarne doesn't
use monospace fonts in his book.
ben This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sylvain Thenault |
last post by:
Hi there !
I've noticed the following problem with python >= 2.3 (actually 2.3.4 and
2.4):
syt@musca:test$ python
Python 2.3.4 (#2, Sep 24 2004, 08:39:09)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import parser
>>> parser.suite('# -*- coding: IBO-8859-1 -*-')
|
by: M.Siler |
last post by:
<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT>
<!--
var factor_val = new Array(8,7)
factor_val = 68.8
factor_val = 55
|
by: Sam |
last post by:
Hi I'm learning to code with C++ and wrote some very simple code. I
think it's consistent with every rule but always got compiling errors
that I don't understand.
The code include 5 files as following, delimited by //////:
////////////////pose.h
#ifndef pose_h
#define pose_h
#include "point.h"
|
by: Dart |
last post by:
This code is okay:
class CSingle
{
public:
static CSingle membs;
int MEM_NUM;
CSingle(int n)
{
}
|
by: Madhur |
last post by:
Hello
what about this nice way to open a file in single line rather than using
if and else.
#include<stdio.h>
void main()
{
FILE *nd;
clrscr();
fopen("c:\\autoexec.bat","r")&&printf("success") || printf("error opeing
| |
by: Curious Student |
last post by:
Some places till now, I've seen function prototypes within functions
instead of in the global declaration space, which I thought was the
way.
I thought it was <I>only</I>:
int myfunction(int, int);
int main(void)
{
|
by: Sune |
last post by:
Hi,
previously I used Eclipse CDT for compiling my files just to get
started with C and leave C++ behind. Now it's time to get a little more
serious so I've moved my files to a new workplace and begun to use GNU
Autotools. I'm sorry to say I'm new to gcc as well :(
Now I get the most ridiculous compile error which I'm unable to solve.
Can someone, please, help me with this? gcc output together with the
files mentioned in the gcc error...
|
by: arun_shamli |
last post by:
class CDate
{
public:
CDate() {}
CDate(const CDate& date) {}
};
CDate function1()
{
CDate date();
return date;
|
by: robert maas, see http://tinyurl.com/uh3t |
last post by:
Here's the source:
#include <stdio.h>
#include <errno.h>
main () {
char* str = "9999999999";
long long int llin; char* endptr; /* Set by strtoll */
int nch;
errno = 0;
llin = strtoll(str, &endptr, 10);
printf("errno=%d\n", errno);
|
by: mosfet |
last post by:
HI,
when trying to compile an embedded version of STL called ustl on win32
platform I get the following error :
/// Returns the minimum of \p a and \p b
template <typename T1, typename T2>
inline const T1 min (const T1& a, const T2& b)
{
return (a < b ? a : b);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |