General C++ Programming - June 2015 (Page 10)

Puting strings together
 
So i have a program that asks for a http link and puts that into a string. I get errors when i do this. string link = "somerandomlink"; string x = "wget "li...
[1 reply] : Hello std::string link = "https://www.google.com"; std::string cmd... (by mmw)
string manipulation
 
How can this code be made more better? Besides removing the namespace. I wrote this and understand everything except how the reference works here. That refe...
[4 replies] Last: Consider a pathological case where str is a million 'X' characters and... (by dhayden)
delete struct member
 
i have 2 files, let say tes.bin and tes2.bin both is binary files, tes.bin have this struct : struct tes { int a; char b ; int c; int d; } while tes2.bin ...
[11 replies] Last: Computers are fast and life is short, don't try to over think this. J... (by dhayden)
pointers
 
Why doesn't my insert function work correctly? My print function is purposely done this way for simple testing. I will fix that after my insert works correc...
[4 replies] Last: Create a constructor for your Node class: Node(int d) : data(d), left... (by dhayden)
Static Analyzer Monitor System
 
Can anyone suggest a static analysis tool which has the ability to run every day and generate a report highlighting new errors introduced that day? I have tried...
[no replies]
by mat106
fstream::open sets the fail flag up.How to find the cause?
 
this is the line with fstream::open std::fstream file; file.open("flights",std::ios::binary | std::ios::in ); What confuses me is that ther...
[2 replies] Last: Make sure the file isn't open somewhere else for writing. By the way,... (by LB)
C++ Derived Class Pointer
 
Hi, How can I get a base class pointer? Let's say the class is Existence:Existence(Context *context) { public: protected: Existence * ExistencePtr; } ...
[4 replies] Last: I want the Singleton class to get the SharedPtr (applicationPtr) in th... (by vivienneanthony)
Distance traveled program problem.
 
Can anyone help me write a program for school? I am fairly new to programming and would appreciate some help. The problem: The velocity of a truck moving in ...
[4 replies] Last: @hello, you meant: // pseudo code // pick out your unit system, I '... (by mmw)
by scs
read file from directory every minute
 
read a file located at the specific directory every minute, if file is not updated for more than a minute, return FALSE. means i need to check status of the fil...
[7 replies] Last: Hello, if I may for each timer cycle ; I would checksum the file and... (by mmw)
corrupted double linked list error in runtime
 
Hi, I've been working on a maintenance C++ project. When I add a new pointer to the header of the related class, it give corrupted double linked list error in ...
[1 reply] : The problem is in line 37 of your code. You're forgetting to initiali... (by MikeyBoy)
A C++ Problem
 
n=5; x=0; x= --n + --n; x= ; ? Which is the final value of X ? ---> No loop.
[9 replies] Last: Hello, I mentionned it as an example which perfectly fits the situat... (by mmw)
cannot convert from 'const char *' to 'LPCTSTR'
 
Hello i am using visual studio 2013 on a windows 7 64 bit. I am trying to build a huffman tree, i have actually built it but i have problems when i try to use c...
[6 replies] Last: Yes i am heading to that direction using Unicode or UTF-8, ANSI is jus... (by guilpter)
reversing a string
 
Can someone provide feedback on my reverse function and how it can be made better? Or more correct? Thanks #include <iostream> #include <string> us...
[5 replies] Last: If you're talking about reversing a sequence of words (no punctuation ... (by andywestken)
C2995->'std::complex': use of class template requries template argument list
 
This is FFT program ,i got the error like 1.C2995->'std::complex': use of class template requries template argument list, 2. see the declaration of 'std::co...
[1 reply] : First, please add the code tags and indentation. See http://www.cplusp... (by keskiverto)
How can i use the resource compiler to compile my resource file?
 
I've been digging around the menu of codeblocks and i can't find an option that enables me to use the resource compiler. I need to compile my .rc file into an ....
[2 replies] Last: windres is the GNU tool that corresponds with the Microsoft rc.exe too... (by andywestken)
Exporting d'base table to .csv
 
I understand the rules for exporting a d'base table to .csv and there are plenty of links explaining the rules of csv files, including the handling of comma's/q...
[2 replies] Last: Thanks. I started building this library earlier on. Maybe that's the... (by dominover)
Don't know how to compile with the a space in the name of the source code file...
 
I'm writing my code in simply notepad. I'm very beginner to C++ also. Here is my basic source code.... _______________________________________________ #includ...
[2 replies] Last: That said, you would do well to avoid file names with spaces. There ar... (by Duthomhas)
converting int to string
 
How exactly does this code work? string convertInt(int number) { if (number == 0) return "0"; string temp=""; string returnvalue=...
[2 replies] Last: Hey Andy, thanks so much for that explanation. I completely understand... (by cppnoob25)
how do I just compare first address?
 
list<short int>::reverse_iterator it1 = myList.rbegin(), it2 = addend2.myList.rbegin(); so if i have this number enter 333 123 456-1 // address 34...
[1 reply] : When you say = 333 = 123 = 456-1 are these stored in the list ... (by andywestken)
Need help with solving this compiler error
 
I am trying to make a .rc (run command) file so that i can make a windows menu for my word processor application, but the compiler keeps giving me this error "e...
[5 replies] Last: Nevermind, i figured it out. It turns out that i wasn't supposed to i... (by SomeAmazingGuy)
June 2015 Pages: 1... 89101112... 16
  Archived months: [may2015] [jul2015]

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