Apologies if this in the wrong forum. Can any one tell me how to turn off the Microsoft non-standard extensions to create an ANSI standard project?
Thanks!
Type: Posts; User: steals10304
Apologies if this in the wrong forum. Can any one tell me how to turn off the Microsoft non-standard extensions to create an ANSI standard project?
Thanks!
I've tried this, but the memory leak report does not show up in the output box. I am not sure what is preventing it.
I'm running windows. It looks like Valgrind is for a linux box. Also, I'm a student and don't want to buy anything.
I am wondering if the class I have designed will leak memory. Does my destructor do all neccesary clean up? I appreciate any help you can offer. I attempted to find a easy to use leak detector,...
FILE *OpenTemporaryFile(void)
{
FILE *pFile;
if((pFile = tmpfile()) == NULL)
{
fprintf(stderr, "Cant open temp file\n");
exit(EXIT_FAILURE);
}
return pFile;
}
I am trying to read from a text file, and have each word become a new string. Is fgets a bad weapon of choice? It reads until a \n character, I guess I need to read until ' '?
LIST...
Yes, forgive me for my noobness (if that's not a word, I just coined it), but shouldn't you be able to access any 2 Dimensional pointer array with [two][subscript] notation?
One requirement of...
In this problem, I am required to allocate memory ALL AT ONCE. Only one dynamic allocation is allowed. I believe I have code that will allocate all memory needed:
int ** p;
int cols,...
I wanted to get a couple opinions on how to get hired as a software engineer given my low level of expertise. Would you be willing to give me advice?
About me: BA in Business Administration from...
Sure....
strtok function tests each incoming char against a set of arbitrary delimiters (AEIOUaeiou\n), if said char is not one of these control falls to puts(cp). After it finds a delimiter it...
I think it should be right before puts(cp) here:
for(cp = buf; cp = strtok(cp, "AEIOUaeiou\n"); cp = NULL)
puts(cp);
puts(buf);
[
I need function ParseStringFields() to skip leading white space in each delimited field created by the strtok function. I must use isspace() function. I am having a hard time with this? Help?
...
given:
float numbers[25];
what is the data type of numbers in the following:
&(numbers + printf("Hello"));
I think it would still be an array of floats?
Hmmm... I retyped them and they appeared like the ones around the file name. Then the program compiled just fine. Were they italicized before?
Thanks anyway.
I am a noob. Here is a simple fopen, I am trying to create this file. However I am getting the following errors:
1>c:\users\robert\documents\visual studio 2008\projects\test\test\source.c(9) :...
I know how to get input from the keyboard. I do not know how to loop the program so that it prints three lines, waits for the enter key to print three more ect...
I would like the program to wait for user to hit the newline (Enter key) after it prints the first 3 lines of text, if the enter key is hit the program will print three more lines of text, this...
I was hoping this would print the first three lines of text?
Here is my code:
#include <stdio.h>
#include <stdlib.h>
#define LINECOUNT 3
#define SOURCE_FILE...
So the code should read:
for(lineCounter = 0; lineCounter <= LINECOUNT;) ?
Still doesn't work.
I am getting compiler errors in my for loop and an illegal break within said for loop...Help?
Errors:
1>c:\users\robert\my programs\assignment 8_exercise 2\source.c(36) : error C2143: syntax...
It just skips to the next cout...
#include <iostream>
#include <cstdlib>
#include <string>
using namespace std;
1>c:\users\robert\my programs\assignment 8 exercise 1\source 1.cpp(32) : error C2784: 'std::basic_ostream<_Elem,_Traits> &std::operator <<(std::basic_ostream<_Elem,_Traits> &,const...
Thanks:
#include <iostream>
#include <cstdlib>
#include <string>
using std::string;
using namespace std;
Duh! Thanks.
The following program will not compile, it gives me a long line of errors:
>Source 1.c
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error :...