stray pointer Programming Software Development by freelancelote Hi, I'm learning C++ at the moment using one of Jesse Liberty's books and got to the pointers day. They ask to code a stray pointer as an exercise and give as a solution the following code: [CODE=syntax] int main() { int *pVar; *pVar = 9; return 0; }[/CODE] Could anyone tell me why is pVar a stray pointer? Thanks, stray 302 error Programming Software Development by v3ga …; } [/CODE] Compiling with g++ goves errors: dfs.cpp:33: error: stray ‘\302’ in program dfs.cpp:33: error… Stray non-printing characters in my programs Programming Software Development by Labdabeta … any program I get the errors "stray '\302' in program" and "stray '\206' in program" about every 20… stray '\150' in program Programming Software Development by sciwizeh …); SetupRC(); glutMainLoop(); } [/CODE] and i get a few errors 64 stray '\150' in program 64 expected ')' before "rsize" expected… stray '\312' error compiling Programming Software Development by noobday …++ code ; when trying to compile on codeblocks it says : error - stray '\312' in program [CODE] #include <string> #include <… Stray start tag div Digital Media UI / UX Design by davy_yg …=http%3A%2F%2Fwww.innovation.web.id%2FOne%2F Error: Stray start tag div. From line 180, column 1; to line… Resolution of "stray \### in program" errors Programming Software Development by Labdabeta … [here](https://www.daniweb.com/software-development/threads/441611/stray-non-printing-characters-in-my-programs) and [here](https… characters were /302/206. Another example is mike_2000_17's stray /302/240, let's analyze that as well. **… source window. tl;dr: Convert each byte of your stray characters into hexadecimal, check U+#### and U+00## to… Monitor problem - stray white marks Hardware and Software Hardware by MrMe123 I have an widescreen HP monitor that's almost 2 years old. It's been developing these random stray white marks along the top of the screen and I have no clue as to the cause of this problem. Could someone please help. Dev C++ Error "stray '\32 ' in program" please help Programming Software Development by hezechiel I trying compile my program but it all time write error: stray '\32 ' in program , I have there some graphics instruction, I think its error with directx but Im not surre. If somebody want i can send him my source. Re: Dev C++ Error "stray '\32 ' in program" please help Programming Software Development by praveensahu [QUOTE=hezechiel;615941]so thanks :) i will try it[/QUOTE] i am geting error: stray ‘/32’ in program i dont why please help me in compiling Re: stray pointer Programming Software Development by Ancient Dragon Because the pointer has not been initialized to anything. It just points to some random location in memory, which your program may, but probably does not, own. Before using a pointer you must initialize it to point somepace. For example: [code] int *pVar; int number; [color=red]pVar = &number;[/color] *pVar = 9; [/code] Re: stray pointer Programming Software Development by freelancelote OK, thank you. Re: stray pointer Programming Software Development by William Hemsworth Theres also another common mistake that people make, which can easily cause memory leaks, consider this example:[CODE=CPLUSPLUS]int *varPtr = new int[1000]; // Allocate 1000 int's int intArray[] = {1, 2, 3, 4, 5}; // Make an array varPtr = intArray; // Assign varPtr with the adress of intArray[/CODE] In this example, you allocated 1000 int's, but… Re: stray 302 error Programming Software Development by Narue There's an invisible control character on line 33. Delete the line and rewrite it. Re: stray 302 error Programming Software Development by v3ga [QUOTE=Narue;1682367]There's an invisible control character on line 33. Delete the line and rewrite it.[/QUOTE] Thanks. It worked Re: Stray non-printing characters in my programs Programming Software Development by deceptikon That usually only happens when you're trying to open or copy/paste files that were written on another system or with a less than friendly text editor. Does it happen when you write code directly in Code::Blocks? Re: Stray non-printing characters in my programs Programming Software Development by Labdabeta Yes, usually at the end of a line. It seems that when I hit enter sometimes it prints '\302' '\206' '\n' instead of just the newline. Re: stray '\150' in program Programming Software Development by Nick Evan Wow, that was a problem I never encoutered before, but I solved it :) This piece of code [code] else if( y1 < -((windowHeight)[COLOR="Red"]–[/COLOR]rsize+ystep) ) y1 = -windowHeight + rsize -1; [/code] should be replaced with this: [code] else if( y1 < -((windowHeight)[COLOR="Green"]-[/COLOR]rsize… Re: stray '\150' in program Programming Software Development by sciwizeh Thats a very weird error. Thanks Re: stray '\150' in program Programming Software Development by Loic Wow thanks a lot, a miracle I found this thread! :) Re: stray '\312' error compiling Programming Software Development by Nick Evan Try deleting all the whitespace around that line. This character isn't visible, but might still be there. [B]>>I'm on mac however so that migth explain the problem[/B] True. '\312' is hex 0xCA -- the "non-breaking space" in MacRoman encoding. So try removing whitespaces and re-add them. Maybe mac has somesort of setting for this, … Re: stray '\312' error compiling Programming Software Development by noobday thanks a million, the free invisible space was exactly the problem! Noobday Re: stray '\150' in program Programming Software Development by gkaykck thanks, this is the weirdest problem i have ever seen by the way Re: stray '\150' in program Programming Software Development by ecemunal Thank you very much, I will never think of this solution. Re: stray '\150' in program Programming Software Development by jephthah I shall never think of it either. And let us never speak of it again. Re: Stray start tag div Digital Media UI / UX Design by cereal Hello, move the `</body>` tag to the end of the page, just before the `</html>` tag. An HTML document is composed two main sections, head and body: <html> <head> <title>Test</title> </head> <body> <!-- content area -->… Stray '\171' in program error. Programming Software Development by vladimir.bednoi Good day, I need help with my code. It's very simple and I was compiling it successfully at school, but at home I'm having problems with it. Here is the code. http://gyazo.com/dc78a310f529374338a244227b56215f and #include <cmath> #include <iostream> #include <conio.h> using namespace std; int main () {… Re: Stray '\171' in program error. Programming Software Development by Moschops Spot the difference time: `«` vs `<<` `»` vs `>>` The one on the left is not C++ code. The one on the right is. This is what happens when you copy and paste code. Re: Dev C++ Error "stray '\32 ' in program" please help Programming Software Development by Nick Evan Please post the code and line number where the error occurs. I left my crystal ball at home and so I can't see what causes this error Re: Dev C++ Error "stray '\32 ' in program" please help Programming Software Development by hezechiel hmm so how u want :) but i dont know if its help u :) error is at last line , there where u see square after } this program work on Turbo C with small changes like clrscr, etc.