Beginners - November 2010 (Page 25)

GetPrivateProfileString
 
char buffer ; wstring currentFile = s2ws(info->fileName); GetPrivateProfileString(currentFile.c_str(), TEXT("ENABLED"), TEXT("InvalidFileName"), LPWSTR(buffe...
[4 replies] Last: GetPrivateProfileStringA was a good one, thanks! Problem solved. (by soupsoup)
Return an Array from a Function
 
This is part of my Wumpus Hunt program. Suggestions were to clean up the main() part of the program by creating functions. I am working on that and ran into th...
[1 reply] : Here is what was given as the correct way to return an array. Is that... (by hamsterman)
Byte Alignment in C structure
 
Hello , I had a program which was crashing in HP IA 64 bit machine. My program is configured for 4 byte alignment( #pragma pack(4)). The same program didnt...
[1 reply] : please do not re-post the same question Ref: http://www.cplusplus.... (by vvadan)
Using Overloaded Constructors
 
Student(int k, double h, double q, double e); <--------- is the overloaded constructor class Student { int studentID; int HomeworkAvg; int QuizAvg; i...
[3 replies] Last: You have multiple problems in the class 1) overloaded constructor i... (by vvadan)
by afable
typeid(xxxx).name() "m" returned?
 
Hi everyone. I have a quick question. I'm learning C++ on my windows machine using cygwin's g++. My question is that my book (c++ primper plus 7th ed.) state...
[3 replies] Last: Thanks for the information kbw and jsmith. I'll look up the definition... (by afable)
by waxman
Storing a Formula, Not the Result
 
Hello all, I'm working on a basic spreadsheet application, and I am trying to figure out how to store a formula in an array cell, and not the result it gives...
[9 replies] Last: I would strongly recommend that you use more meaningful names for th... (by jsmith)
Complex Numbers (Division)
 
#include <cmath> #include <iostream> #include <iomanip> using namespace std; class complex { private: int real; // Real Part ...
[3 replies] Last: nothing wrong with that. (22+7i)/13 = 22/13 + 7/13*i = 1.69 + 0.54i. ... (by hamsterman)
by toks
vector of strings
 
hello, i use the code below #include <string> #include <stdlib.h> #include <conio.h> using namespace std; int main (void) { ...
[3 replies] Last: Thank you very much . (by toks)
by heidiK
duplicate removal
 
Could anyone please help [code removed] I have a file having blocks of data. The data block has some lines having OrderReceive in it. These lines are duplica...
[4 replies] Last: Thanks a LOT coder777 :-) . Let me try your code (by heidiK)
delete a word
 
can anyone give me a general syntax on how to delete a specific word from a text file. for example the menu choice is delete a word and it prompts the user to...
[3 replies] Last: No, it is not a simpler process; reading in parts is more complex th... (by Duthomhas)
invalid conversion and too few arguments errors
 
First off-This is a homework(lab problem) that i need a hint or some guidance on. Ive been working on it for 6 hours and think I am getting close but some error...
[no replies]
How are Graphics done?
 
The Question. How are Graphics done? Do I need a certain complier? Do I need A certain program? How do I code them? Just give me all the info you know on creati...
[5 replies] Last: #include the library headers and tell the linker that you are using th... (by Bazzy)
difference between n* p and n *p
 
// what is difference between n*p and n *p Sort ( node *head) { Node* first,second,temp; First= head; While(first!=null) } Explain as point...
[1 reply] : There's no difference (by Bazzy)
Newbie - Split an array in two and return
 
Hello all - I'm VERY new to C++ so please forgive me. I've been given the following tasks and I'm just lost. "Unsorted Type" is an ADT that is to be extended a...
[4 replies] Last: sohguanh It's better not to do other people's homework. (by kbw)
by KLSlim
Break string into seperate words and translate
 
I'm working on a homework assignment that translates English to Pig Latin, what I have so far gets the sentence but doesn't separate out the individual words an...
[11 replies] Last: Ok this works but I don't understand what the if (std::string::npos =... (by coder777)
Finding lowest/highest values in 2D array
 
Hey guys, any idea as to how to find the lowest value and the highest value in this 2D array? I made the functions to find the lowest and highest, but all im ge...
[9 replies] Last: [quote=I]then replace every cout with the fstream object In your fun... (by hamsterman)
by m m
Turn the name of a variable into a string.
 
Hi everybody, I am typing a public function member of a class that writes its content i.e. value of the variables etc. into a file. I would like the file to ...
[5 replies] Last: ejemmm... I meant many thanks to all, (by m m)
Classes vs Unions and Structs
 
No one has really told me how to know when to and when not to use classes. Validate whether the statements below are true or false: - Unions can contain vari...
[4 replies] Last: Okay, makes sense. (by fruitloop2222)
Using strings in arrays
 
hello i am rather new to c++ and im wondering if i did this right.. heres the code #include <string> #include <iostream> #ifndef CLASSES_H_INCLUDED #d...
[1 reply] : chars have a single character like 's'. "stats.png" is more than 1 ch... (by Disch)
by crxxtc
average array functions
 
i am trying to pass the total number of entries to a function calcaverage and make it average while dropping the lowest grade and returning the average back to ...
[10 replies] Last: thanks zaita for your help (by crxxtc)
November 2010 Pages: 1... 2324252627... 42
  Archived months: [oct2010] [dec2010]

This is an archived page. To post a new message, go to the current page.