Beginners - June 2015 (Page 31)

How I can use L"" prefix for wide chars
 
I need to use L"" to convert string to LPWSTR in path string variable //this work for me LPWSTR test = L"c:\\aizen.png"; //but I need something like th...
[3 replies] Last: Here is my function : wchar_t* convertStringToWide(string str){ ... (by najiboun)
Overload operator with this pointer
 
Not understanding why this overload of << will not allow this pointer to be used. //ClockType.h #include <iostream> using namespace std; class Cloc...
[2 replies] Last: operator<< isn't a member function so you've got to use the instance n... (by andywestken)
Getting to the begining of the line.
 
Hello. My qustion is, in a text file, if i know how many lines are there, is it possible to set position to begining of a certain line? The line length differ...
[8 replies] Last: Well, you can basically see the finish line, but you keep turning left... (by coder777)
sorting in doubly link list.my code is not working properly.its does sort for 1 or 2 numbers but thn it crashed.
 
void sorting(comp *&h, comp *&t ){ if (h==NULL){ cout<<"oppsssss there is no numbe*r to short";} else{ comp *c; int n=0; c=h; // wh...
[1 reply] : You use c->next without checking if it's null. (by Peter87)
Question about a setting in Visual Studio Professional 2012
 
In my Introduction to C++ Programming class, we are using Visual Studio Professional 2012. One of the things my instructor told us to do was to go through Proje...
[3 replies] Last: That step wasn't part of my instructions, it was just something I was... (by cire)
Not keeping track of lowercases ?
 
I am practicing on a program where i have to keep track on how many lower cases there are but i keep getting zero cant seem to find the problem #include <...
[3 replies] Last: i cant believe i didnt catch that small mistake the last program i wa... (by Raakfal)
HW. i dont understand it
 
• Write a C++ function double dotProduct(double *px, double *py, int n); that returns the dot product of two integer arrays with starting addresses sto...
[1 reply] : You have to write a program that does: dot_product = x *y + x *y + ... (by closed account 48T7M4Gy)
Turbo C++ list files within a directory
 
Hi, I recently started coding in C++ and thought that writing code in old software would be a good place to start, and no need to tell me to stop using it becau...
[2 replies] Last: Unfortunately, TCC is so old that VS versions newer than 4.0 won't sup... (by Duthomhas)
Pointer Function
 
Down below, there is a function called at line 15, "*growArray ()". However, I'm not sure what the difference between a regular function, without the "*" and th...
[1 reply] : I'm not sure what the difference between a regular function, without ... (by AbstractionAnon)
split string into words and integers
 
New c++ coder I would like to accept input "box 3 4 5" or "triangle 10 10" and recognize the first as a shape, then do cal...
[1 reply] : I've written the raw code to read the values. But it looks like your ... (by kbw)
by Shira
problem with templates tree
 
Write your question here. Hello I wrote this code, the function need to return pointer to node of a binary tree: template <class T> Tree<T>::Node<T>* ...
[8 replies] Last: okay. Thank You!! (by Shira)
Array Function Help
 
So im doing some HW for my C++ class and im not sure how to do this. Hes asking fot this: A void function called getOptions()that is bool, with 7 parameters pa...
[5 replies] Last: you can pass arrays like anything else into a function void someFunc... (by andywestken)
Trouble with my case loop
 
Having trouble with case loop. Its giving me an error saying "Jump to case label [-fpermisive]. Help switch (itemmenu){ case 1: cout << "How much wo...
[1 reply] : Not enough information. Your switch statement looks okay assuming Inp... (by AbstractionAnon)
Stuck keep getting an error
 
I have the following code here and I keep getting an error on line 13 13:21: error: invalid use of incomplete type 'std::stringstream {aka class std::basic_stri...
[1 reply] : You need to include the stringstream header. #include <sstream> ... (by AbstractionAnon)
Pointers
 
Hello! I am new at computer programming and I am currently tying to understand pointers and multi-dimensional arrays. I have spent about 5 hours everyday for th...
[13 replies] Last: It'll all make perfect sense eventually. It just takes a little time t... (by Duthomhas)
Alignment Help
 
I need help with making the output be aligned Sorry im new { cout << "--------- OPTIONS AND ACCESSORIES ----------------\n\n"; cout << setw(20) << left << "\...
[8 replies] Last: Thank you guys so much the problem was the numbers I was using in setw... (by juanmiindset)
deleleted
 
deleted
[2 replies] Last: thanks it works now (by closed account yR9wb7Xj)
by zecbmo
getting user input with spaces
 
SO I am working through some exercises and I have made a list program that uses vectors and iterators to create a list of games a user has. He can add/delete/li...
[2 replies] Last: Note the getline problem: http://www.cplusplus.com/forum/general/5143... (by coder777)
problem with a "cin"
 
#include <iostream> #include <string> #include <conio.h> #include <fstream> #ifndef MUSEUM_H #define MUSEUM_H class Museum { public: void UsernameP...
[7 replies] Last: hm... that's odd... what are your inputs? Maybe the previous input wer... (by Gamer2015)
C++ Classes
 
Not compiling correctly. Keeps throwing me LNK2019 errors. Thanks for the help :) //Account.h #ifndef ACCOUNT_H #define ACCOUNT_H #include <iostream>...
[4 replies] Last: kong288 is right. lines 53 and 54 shouldn't be there. These function ... (by andywestken)
June 2015 Pages: 1... 29303132
  Archived months: [may2015] [jul2015]

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